Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add avatar component by Docux #29

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions docs/component-library/new/Simplecard/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,29 +39,29 @@ Creating the file and adding the source code for the component.
<Tabs groupId="js-ts">
<TabItem value="js" label="JS">

```javascript title='\src\components\SimpleCard\Card\index.js'
import React, { CSSProperties } from 'react'; // CSSProperties allows inline styling with better type checking.
import clsx from 'clsx'; // clsx helps manage conditional className names in a clean and concise manner.

```javascript title='\src\components\Avatar\AvatarContainer\index.js'
import React, { CSSProperties } from 'react';
import clsx from 'clsx'; // Assurez-vous d'avoir clsx installé et importé correctement


const Card = ({
className, // classNamees for the container card
style, // Custom styles for the container card
children, // for include others parts in
shadow, // for add shadow under your card Shadow levels: low (lw), medium (md), top-level (tl)
}) => {
const cardShadow = shadow ? `item shadow--${shadow}` :'';
const AvatarContainer = ({
className, // Classes personnalisées pour le composant
style, // Styles personnalisés pour le composant
children, // Contenu du composant
vertical = false,
}) => {
const avatarPosition = vertical ? `avatar--vertical` :'';
return (
<div className="card-demo">
<div className={clsx("card", className, cardShadow)} style={style}>
<div className={clsx("avatar", className, avatarPosition)} style={style}>

{children}
</div></div>
</div>
);
};
}


export default Card;
export default AvatarContainer ;

```

</TabItem>
Juniors017 marked this conversation as resolved.
Show resolved Hide resolved
Expand Down