diff --git a/src/components/avatar/avatar.css b/src/components/avatar/avatar.css index bebbe15..2cf451e 100644 --- a/src/components/avatar/avatar.css +++ b/src/components/avatar/avatar.css @@ -1,15 +1,4 @@ -img{ - width: 120px; - height: 120px; - border-radius: 50%; - border: solid 3px white; - object-fit: cover; - -} - -.container{ - - display: flex; - justify-content: center; - align-items: center; +img.avatar { + width: 50px; + border-radius: 50px; } \ No newline at end of file diff --git a/src/components/avatar/avatar.stories.ts b/src/components/avatar/avatar.stories.ts index 64e1d2b..5494bae 100644 --- a/src/components/avatar/avatar.stories.ts +++ b/src/components/avatar/avatar.stories.ts @@ -1,9 +1,11 @@ import type { StoryObj, Meta } from '@storybook/html'; -import { AvatarProps, avatar } from './index'; + +import { avatar } from './index'; +import type {AvatarProps} from './index'; // More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction#default-export const meta = { - title: 'App/avatar', + title: 'App/Avatar', tags: ['autodocs'], render: (args) => { return avatar(args); @@ -18,12 +20,9 @@ export default meta; type Story = StoryObj; // More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args -export const Primary: Story = { - args: { - imgSrc: 'https://s2-g1.glbimg.com/gZrnzQkY70EZ2ZP0zwB689bUAak=/0x0:5184x3456/1008x0/smart/filters:strip_icc()/i.s3.glbimg.com/v1/AUTH_59edd422c0c84a879bd37670ae4f538a/internal_photos/bs/2020/9/e/EYKMBXR72tNdkUAgmZzQ/azul-caneta.jpg', - descricao: 'Octocat from Github ' +export const meuperfil: Story = { + args: { + imgSrc: 'https://avatars.githubusercontent.com/u/133207241?v=4', + descricao: 'Picture Profile ' } }; - - - diff --git a/src/components/avatar/index.js b/src/components/avatar/index.js index b702dcb..de4650a 100644 --- a/src/components/avatar/index.js +++ b/src/components/avatar/index.js @@ -1,15 +1,16 @@ -import "./avatar.css"; +import './avatar.css' + /** - * @typedef {Object} AvatarProps - * @property {string} AvatarProps.imgSrc - some description here - * @property {string} AvatarProps.descricao - some description here - * @param {AvatarProps} props - */ -export function avatar({ imgSrc, descricao }) { + +*@typedef {Object} AvatarProps +*@property {string} AvatarProps.imgSrc - some description here +*@property {string} AvatarProps.descricao - some description here +*@param {AvatarProps} props + +*/ +export function avatar({imgSrc, descricao}) { return ` -
Nome: ${nome}
+Cargo: ${cargo}
+