From f1d70b8b11551f42324263086da565e19de97623 Mon Sep 17 00:00:00 2001 From: GUSTAVO DOS SANTOS NASCIMENTO Date: Fri, 3 Nov 2023 13:49:31 -0300 Subject: [PATCH 01/18] =?UTF-8?q?configurando=20storiebook=20e=20adicionan?= =?UTF-8?q?do=20o=20bot=C3=A3o?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/counter/counterFunction.js | 7 +++++ .../counter/counterFunction.stories.ts | 24 +++++++++++++++ src/components/logo/logo.js | 12 ++++++++ src/components/logo/logo.stories.ts | 30 +++++++++++++++++++ 4 files changed, 73 insertions(+) create mode 100644 src/components/counter/counterFunction.js create mode 100644 src/components/counter/counterFunction.stories.ts create mode 100644 src/components/logo/logo.js create mode 100644 src/components/logo/logo.stories.ts diff --git a/src/components/counter/counterFunction.js b/src/components/counter/counterFunction.js new file mode 100644 index 0000000..7282418 --- /dev/null +++ b/src/components/counter/counterFunction.js @@ -0,0 +1,7 @@ +import '../../style.css' + +export function counter() { + return `
+ +
`; +} diff --git a/src/components/counter/counterFunction.stories.ts b/src/components/counter/counterFunction.stories.ts new file mode 100644 index 0000000..9e4fde0 --- /dev/null +++ b/src/components/counter/counterFunction.stories.ts @@ -0,0 +1,24 @@ +import type { StoryObj, Meta } from '@storybook/html'; +import { counter } from './counterFunction.js'; + +// More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction#default-export +const meta = { + title: 'App/Counter', + tags: ['autodocs'], + render: () => { + // You can either use a function to create DOM elements or use a plain html string! + // return `
${label}
`; + return counter(); + }, +} satisfies Meta; + +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: { + primary: true, + label: 'Button', + }, +}; \ No newline at end of file diff --git a/src/components/logo/logo.js b/src/components/logo/logo.js new file mode 100644 index 0000000..8944a80 --- /dev/null +++ b/src/components/logo/logo.js @@ -0,0 +1,12 @@ +import '../../style.css' + +/** + * @param {string} link + * @param {string} img + * @param {string} descricao + */ +export function logo(link, img, descricao) { + return ` + +`; +} diff --git a/src/components/logo/logo.stories.ts b/src/components/logo/logo.stories.ts new file mode 100644 index 0000000..1ae53a5 --- /dev/null +++ b/src/components/logo/logo.stories.ts @@ -0,0 +1,30 @@ +import type { StoryObj, Meta } from '@storybook/html'; +import { logo } from './logo.js'; + +// More on how to set up stories at: https://storybook.js.org/docs/html/writing-stories/introduction#default-export +const meta = { + title: 'App/Logo', + tags: ['autodocs'], + render: () => { + // You can either use a function to create DOM elements or use a plain html string! + // return `
${label}
`; + return logo("google.com", "../../../public/vite.svg", "Vite"); + }, + + argTypes: { + Logo: { + control: { type: 'select' }, + options: ['Vite', 'JavaScript'], + }, + } +} satisfies Meta; + +export default meta; +type Story = StoryObj; + +// More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args +export const Vite: Story = { + args: { + Logo: "Vite" + }, +}; \ No newline at end of file From 93dd99809749d06e272620da3b5cbe11c8ee4003 Mon Sep 17 00:00:00 2001 From: Rodrigo Neto Date: Fri, 10 Nov 2023 12:47:43 +0000 Subject: [PATCH 02/18] . --- src/counter.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/counter.js b/src/counter.js index 63bd9b8..45bab2a 100644 --- a/src/counter.js +++ b/src/counter.js @@ -15,3 +15,5 @@ export function setupCounter(element) { element.addEventListener("click", () => setCounter(counter + 1)); setCounter(0); } + + From c76018b2614344773cda4714d153d19ed21b8b17 Mon Sep 17 00:00:00 2001 From: Gustavo Nascimento Date: Fri, 10 Nov 2023 14:57:50 +0000 Subject: [PATCH 03/18] Card alias --- src/components/avatar/avatar.css | 6 +++++ src/components/avatar/avatar.stories.ts | 31 +++++++++++++++++++++++++ src/components/avatar/index.js | 18 ++++++++++++++ src/components/card/card.css | 0 src/components/card/card.stories.ts | 30 ++++++++++++++++++++++++ src/components/card/index.js | 26 +++++++++++++++++++++ 6 files changed, 111 insertions(+) create mode 100644 src/components/avatar/avatar.css create mode 100644 src/components/avatar/avatar.stories.ts create mode 100644 src/components/avatar/index.js create mode 100644 src/components/card/card.css create mode 100644 src/components/card/card.stories.ts create mode 100644 src/components/card/index.js diff --git a/src/components/avatar/avatar.css b/src/components/avatar/avatar.css new file mode 100644 index 0000000..e8f7daa --- /dev/null +++ b/src/components/avatar/avatar.css @@ -0,0 +1,6 @@ +.avatar-container img { + border: 3px solid red; + padding: 3px; + border-radius: 50%; + width: 250px; +} \ No newline at end of file diff --git a/src/components/avatar/avatar.stories.ts b/src/components/avatar/avatar.stories.ts new file mode 100644 index 0000000..0b2ac88 --- /dev/null +++ b/src/components/avatar/avatar.stories.ts @@ -0,0 +1,31 @@ +import type { StoryObj, Meta } from '@storybook/html'; + +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', + tags: ['autodocs'], + render: (args) => { + return avatar(args); + }, + argTypes: { + link: {description: 'endereço para o link do Avatar'}, + imgSrc: {description: 'endereço para a imagem do Avatar'}, + descricao: {description: 'descrição da imagem do Avatar'} + } +} satisfies Meta; + +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: { + link: 'https://github.com/Gustavo-S-Nascimento', + imgSrc: 'https://avatars.githubusercontent.com/u/74427958?v=4', + descricao: 'Avatar from github' + } +}; + diff --git a/src/components/avatar/index.js b/src/components/avatar/index.js new file mode 100644 index 0000000..04162a4 --- /dev/null +++ b/src/components/avatar/index.js @@ -0,0 +1,18 @@ +import './avatar.css' + + +/** + * @typedef {Object} avatarProps + * @property {string} avatarProps.link - some description here + * @property {string} avatarProps.imgSrc - some description here + * @property {string} avatarProps.descricao - some description here + * + * @param {avatarProps} props + */ +export function avatar({link, imgSrc, descricao}) { + return ` + + ${descricao} + + ` +} diff --git a/src/components/card/card.css b/src/components/card/card.css new file mode 100644 index 0000000..e69de29 diff --git a/src/components/card/card.stories.ts b/src/components/card/card.stories.ts new file mode 100644 index 0000000..6432b26 --- /dev/null +++ b/src/components/card/card.stories.ts @@ -0,0 +1,30 @@ +import type { StoryObj, Meta } from '@storybook/html'; + +import { CardProps, card } 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/card', + tags: ['autodocs'], + render: (args) => { + return card(args); + }, + argTypes: { + nome: {description: 'endereço para o nome do logo'}, + img: {description: 'endereço para a imgaem do logo'}, + cargo: {description: 'descrição da imagem do logo'} + } +} satisfies Meta; + +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: { + nome: 'Polvo', + img: 'https://github.githubassets.com/assets/mona-loading-dark-7701a7b97370.gif', + cargo: 'Emoji Github' + } +}; + diff --git a/src/components/card/index.js b/src/components/card/index.js new file mode 100644 index 0000000..a7d4999 --- /dev/null +++ b/src/components/card/index.js @@ -0,0 +1,26 @@ +import { avatar } from "../avatar"; + +/** + * @typedef { Object } CardProps + * @property { string } CardProps.nome + * @property { string } CardProps.cargo + * @property { string } CardProps.img + * @param { CardProps } props + */ + +export function card({ nome, cargo, img }) { + return ` +
+
+ ${avatar({ link: "", imgSrc: img, descricao: "" })} +
+ +
+

Nome: ${nome}

+

Cargo: ${cargo}

+
+ + +
+ `; +} \ No newline at end of file From 70dcabee83f4e949eb85a4f353b831711ac090bf Mon Sep 17 00:00:00 2001 From: FRANCISCO RODRIGUES SOBRINHO NETO Date: Fri, 3 Nov 2023 13:47:06 -0600 Subject: [PATCH 04/18] =?UTF-8?q?come=C3=A7ando?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/avatar/avatar.css | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 src/components/avatar/avatar.css diff --git a/src/components/avatar/avatar.css b/src/components/avatar/avatar.css new file mode 100644 index 0000000..d6eab44 --- /dev/null +++ b/src/components/avatar/avatar.css @@ -0,0 +1,8 @@ +img{ + width: 3rem; + height: 3rem; + border-radius: 50%; + border: 3px solid blue; + object-fit: cover; + +} \ No newline at end of file From 8135971cf61b928dec18f07a4d35a0504a0ebfa0 Mon Sep 17 00:00:00 2001 From: Rodrigo Neto Date: Fri, 10 Nov 2023 15:08:08 +0000 Subject: [PATCH 05/18] feitos avatar e card --- .gitpod.yml | 11 ++++ src/components/avatar/avatar.stories.ts | 29 +++++++++ src/components/avatar/index.js | 13 ++++ src/components/cards/card.css | 5 ++ src/components/cards/card.stories.ts | 31 ++++++++++ src/components/cards/index.js | 26 ++++++++ src/components/counter/counter.css | 74 +++++++++++++++++++++++ src/components/counter/counter.stories.ts | 15 +++++ src/components/counter/index.js | 9 +++ src/components/logo/index.js | 10 +++ 10 files changed, 223 insertions(+) create mode 100644 .gitpod.yml create mode 100644 src/components/avatar/avatar.stories.ts create mode 100644 src/components/avatar/index.js create mode 100644 src/components/cards/card.css create mode 100644 src/components/cards/card.stories.ts create mode 100644 src/components/cards/index.js diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..9e083d8 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,11 @@ +# This configuration file was automatically generated by Gitpod. +# Please adjust to your needs (see https://www.gitpod.io/docs/introduction/learn-gitpod/gitpod-yaml) +# and commit this file to your remote git repository to share the goodness with others. + +# Learn more from ready-to-use templates: https://www.gitpod.io/docs/introduction/getting-started/quickstart + +tasks: + - init: npm install && npm run build + command: npm run dev + + diff --git a/src/components/avatar/avatar.stories.ts b/src/components/avatar/avatar.stories.ts new file mode 100644 index 0000000..64e1d2b --- /dev/null +++ b/src/components/avatar/avatar.stories.ts @@ -0,0 +1,29 @@ +import type { StoryObj, Meta } from '@storybook/html'; +import { AvatarProps, avatar } 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', + tags: ['autodocs'], + render: (args) => { + return avatar(args); + }, + argTypes: { + imgSrc: {description: 'endereço para a imgaem do logo'}, + descricao: {description: 'descrição da imagem do logo'} + } +} satisfies Meta; + +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 ' + } +}; + + + diff --git a/src/components/avatar/index.js b/src/components/avatar/index.js new file mode 100644 index 0000000..35e0208 --- /dev/null +++ b/src/components/avatar/index.js @@ -0,0 +1,13 @@ +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 }) { + return ` + ${descricao} + `; +} \ No newline at end of file diff --git a/src/components/cards/card.css b/src/components/cards/card.css new file mode 100644 index 0000000..21fe5f2 --- /dev/null +++ b/src/components/cards/card.css @@ -0,0 +1,5 @@ +.container{ + display: flex; + justify-content: center; + +} \ No newline at end of file diff --git a/src/components/cards/card.stories.ts b/src/components/cards/card.stories.ts new file mode 100644 index 0000000..f352356 --- /dev/null +++ b/src/components/cards/card.stories.ts @@ -0,0 +1,31 @@ +import type { StoryObj, Meta } from '@storybook/html'; +import type { CardProps } from './index'; +import { card } 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/card', + tags: ['autodocs'], + render: (args) => { + return card(args); + }, + argTypes: { + nome: {cargo: 'nome do profile'}, + cargo: {description: 'descrição da imagem do logo'},img: {description: 'descrição da imagem do logo'} + } +} satisfies Meta; + +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: { + nome: ' Mr. Abraão Alves', + cargo: 'The King of Typescript', + img: 'https://avatars.githubusercontent.com/u/608731?v=4', + + } +}; + + + diff --git a/src/components/cards/index.js b/src/components/cards/index.js new file mode 100644 index 0000000..40a5dd0 --- /dev/null +++ b/src/components/cards/index.js @@ -0,0 +1,26 @@ +import { avatar } from "../avatar"; + +/** + * @typedef { Object } CardProps + * @property { string } CardProps.nome + * @property { string } CardProps.cargo + * @property { string } CardProps.img + * @param { CardProps } props + */ + +export function card({ nome, cargo, img }) { + return ` +
+
+ ${avatar({ imgSrc: img, descricao: "" })} +
+ +
+

Nome: ${nome}

+

Cargo: ${cargo}

+
+ + +
+ `; +} \ No newline at end of file diff --git a/src/components/counter/counter.css b/src/components/counter/counter.css index 14c8042..7d7e844 100644 --- a/src/components/counter/counter.css +++ b/src/components/counter/counter.css @@ -1,4 +1,78 @@ +<<<<<<< HEAD .card button { background-color: red; +======= +html, +body { + margin: 0; + padding: 0; + width: 100%; + height: 100vh; + display: flex; + flex-direction: row; + justify-content: center; + align-items: center; + background: #000; +} + +.glow-on-hover { + width: 220px; + height: 50px; + border: none; + outline: none; + color: #fff; + background: #111; + cursor: pointer; + position: relative; + z-index: 0; + border-radius: 10px; +} + +.glow-on-hover:before { + content: ''; + background: linear-gradient(45deg, #ff0000, #ff7300, #fffb00, #48ff00, #00ffd5, #002bff, #7a00ff, #ff00c8, #ff0000); + position: absolute; + top: -2px; + left:-2px; + background-size: 400%; + z-index: -1; + filter: blur(5px); + width: calc(100% + 4px); + height: calc(100% + 4px); + animation: glowing 20s linear infinite; + opacity: 0; + transition: opacity .3s ease-in-out; + border-radius: 10px; +} + +.glow-on-hover:active { + color: #000 +} + +.glow-on-hover:active:after { + background: transparent; +} + +.glow-on-hover:hover:before { + opacity: 1; +} + +.glow-on-hover:after { + z-index: -1; + content: ''; + position: absolute; + width: 100%; + height: 100%; + background: #111; + left: 0; + top: 0; + border-radius: 10px; +} + +@keyframes glowing { + 0% { background-position: 0 0; } + 50% { background-position: 400% 0; } + 100% { background-position: 0 0; } +>>>>>>> a1169f6 (botão feito) } \ No newline at end of file diff --git a/src/components/counter/counter.stories.ts b/src/components/counter/counter.stories.ts index 1050e9a..d52d226 100644 --- a/src/components/counter/counter.stories.ts +++ b/src/components/counter/counter.stories.ts @@ -6,14 +6,21 @@ import { counter } from './index'; const meta = { title: 'App/Counter', tags: ['autodocs'], +<<<<<<< HEAD parameters:{ layout: 'fullscreen' }, +======= +>>>>>>> a1169f6 (botão feito) render: () => { // You can either use a function to create DOM elements or use a plain html string! // return `
${label}
`; return counter(); }, +<<<<<<< HEAD +======= + +>>>>>>> a1169f6 (botão feito) } satisfies Meta; export default meta; @@ -21,6 +28,14 @@ type Story = StoryObj; // More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args export const Primary: Story = { +<<<<<<< HEAD args: {}, }; +======= + args: { + primary: true, + label: 'Button', + }, +}; +>>>>>>> a1169f6 (botão feito) diff --git a/src/components/counter/index.js b/src/components/counter/index.js index c66ff4c..fc9c8eb 100644 --- a/src/components/counter/index.js +++ b/src/components/counter/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD import './counter.css'; export function counter() { @@ -8,4 +9,12 @@ export function counter() { `; +======= +import './counter.css' +export function counter() { + return ` +
+ +
` +>>>>>>> a1169f6 (botão feito) } \ No newline at end of file diff --git a/src/components/logo/index.js b/src/components/logo/index.js index 84b95d8..60c43db 100644 --- a/src/components/logo/index.js +++ b/src/components/logo/index.js @@ -1,3 +1,4 @@ +<<<<<<< HEAD import './logo.css' @@ -16,3 +17,12 @@ export function logo({link, imgSrc, descricao}) { ` } +======= +export function logo(link, img, descricao) { + return ` + + + + ` + } +>>>>>>> a1169f6 (botão feito) From 6531fcfd628b13be44412cd6813be56a255d25df Mon Sep 17 00:00:00 2001 From: Gustavo-S-Nascimento Date: Wed, 15 Nov 2023 00:38:32 -0300 Subject: [PATCH 06/18] Ideia de card --- src/components/avatar/avatar.css | 9 ++-- src/components/card/card.css | 70 +++++++++++++++++++++++++++++ src/components/card/card.stories.ts | 19 ++++++-- src/components/card/index.js | 28 ++++++------ 4 files changed, 104 insertions(+), 22 deletions(-) diff --git a/src/components/avatar/avatar.css b/src/components/avatar/avatar.css index e8f7daa..2ab080e 100644 --- a/src/components/avatar/avatar.css +++ b/src/components/avatar/avatar.css @@ -1,6 +1,5 @@ -.avatar-container img { - border: 3px solid red; - padding: 3px; - border-radius: 50%; - width: 250px; +.card-container img { + width: 11rem; + height: 17rem; + object-fit: cover; } \ No newline at end of file diff --git a/src/components/card/card.css b/src/components/card/card.css index e69de29..60db77a 100644 --- a/src/components/card/card.css +++ b/src/components/card/card.css @@ -0,0 +1,70 @@ +@import url(https://fonts.google.com/specimen/Poppins); + +* { + padding: 0; + margin: 0; + box-sizing: border-box; +} + + +.card { + width: 11.4375rem; + height: 17rem; + border-radius: 1.25rem; + border: 4px solid #5ee0f9; + overflow: hidden; + font-family: Poppins, Arial, Helvetica, sans-serif; + overflow: hidden; +} + +.card-container { + width: 100%; + height: 100%; +} + +.card-container img { + width: 11rem; + height: 17rem; + object-fit: cover; +} + +.card-container .footer { + position: relative; + width: 100%; + height: 45px; + bottom: 60px; + background: rgba(87, 87, 87, 0.70); + backdrop-filter: blur(27.5px); + display: inline-flex; + flex-wrap: wrap; + flex-direction: column; + justify-content: center; + align-items: center; + border-radius: 0 0 10px 10px; + padding: 5px; + color: #fff; +} + +.info { + display: flex; + flex-direction: column; + justify-content: center; + align-items: flex-start; +} + +.footer p { + font-size: .875em; + font-weight: 700; +} + +.footer span { + font-size: .6875rem; + font-weight: 400; +} + +.footer .button-white { + width: 1.875rem; + height: 1.8625rem; + background-color: #fff; + border-radius: 10px; +} \ No newline at end of file diff --git a/src/components/card/card.stories.ts b/src/components/card/card.stories.ts index 6432b26..21ced85 100644 --- a/src/components/card/card.stories.ts +++ b/src/components/card/card.stories.ts @@ -10,9 +10,10 @@ const meta = { return card(args); }, argTypes: { - nome: {description: 'endereço para o nome do logo'}, - img: {description: 'endereço para a imgaem do logo'}, - cargo: {description: 'descrição da imagem do logo'} + nome: {description: 'Nome do objeto de avatar'}, + img: {description: 'endereço para a imagem do avatar'}, + cargo: {description: 'cargo do objeto de avatar'}, + idade: {description: 'Idade do objeto de avatar'} } } satisfies Meta; @@ -24,7 +25,17 @@ export const Primary: Story = { args: { nome: 'Polvo', img: 'https://github.githubassets.com/assets/mona-loading-dark-7701a7b97370.gif', - cargo: 'Emoji Github' + cargo: 'Emoji Github', + idade: 20 } }; +export const Wikipedia: Story = { + args: { + nome: "João Vitor", + img: 'https://avatars.githubusercontent.com/u/84153149?v=4', + cargo: "Wikipedia", + idade: 20 + } +} + diff --git a/src/components/card/index.js b/src/components/card/index.js index a7d4999..98f1f0e 100644 --- a/src/components/card/index.js +++ b/src/components/card/index.js @@ -1,26 +1,28 @@ import { avatar } from "../avatar"; +import './card.css'; /** * @typedef { Object } CardProps * @property { string } CardProps.nome * @property { string } CardProps.cargo * @property { string } CardProps.img + * @property {string} CardProps.idade * @param { CardProps } props */ -export function card({ nome, cargo, img }) { - return ` -
-
- ${avatar({ link: "", imgSrc: img, descricao: "" })} -
- -
-

Nome: ${nome}

-

Cargo: ${cargo}

-
- - +export function card({ nome, cargo, img, idade }) { + return ` +
+
+ ${avatar({ imgSrc: img, descricao: "", link: "" })} + +
+
`; } \ No newline at end of file From cd8aa489999875650357f756133b0ebee9ecfacb Mon Sep 17 00:00:00 2001 From: Rodrigo Neto Date: Wed, 15 Nov 2023 15:50:57 +0000 Subject: [PATCH 07/18] commit init --- src/components/counter/index.js | 9 --------- src/components/logo/index.js | 10 ---------- 2 files changed, 19 deletions(-) diff --git a/src/components/counter/index.js b/src/components/counter/index.js index fc9c8eb..c66ff4c 100644 --- a/src/components/counter/index.js +++ b/src/components/counter/index.js @@ -1,4 +1,3 @@ -<<<<<<< HEAD import './counter.css'; export function counter() { @@ -9,12 +8,4 @@ export function counter() {
`; -======= -import './counter.css' -export function counter() { - return ` -
- -
` ->>>>>>> a1169f6 (botão feito) } \ No newline at end of file diff --git a/src/components/logo/index.js b/src/components/logo/index.js index 60c43db..84b95d8 100644 --- a/src/components/logo/index.js +++ b/src/components/logo/index.js @@ -1,4 +1,3 @@ -<<<<<<< HEAD import './logo.css' @@ -17,12 +16,3 @@ export function logo({link, imgSrc, descricao}) { ` } -======= -export function logo(link, img, descricao) { - return ` - - - - ` - } ->>>>>>> a1169f6 (botão feito) From e2bda4a0eb33eaee9b237d7f3b58dafb2a431f01 Mon Sep 17 00:00:00 2001 From: Gustavo-S-Nascimento Date: Wed, 15 Nov 2023 13:22:34 -0300 Subject: [PATCH 08/18] add color border and blur active --- src/components/card/card.css | 30 +++++++++++++++++++++++++---- src/components/card/card.stories.ts | 27 +++++++++++++++++++------- src/components/card/index.js | 8 +++++--- 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/src/components/card/card.css b/src/components/card/card.css index 60db77a..e6b61ee 100644 --- a/src/components/card/card.css +++ b/src/components/card/card.css @@ -11,8 +11,8 @@ width: 11.4375rem; height: 17rem; border-radius: 1.25rem; - border: 4px solid #5ee0f9; overflow: hidden; + border: 4px solid #444444; font-family: Poppins, Arial, Helvetica, sans-serif; overflow: hidden; } @@ -20,6 +20,7 @@ .card-container { width: 100%; height: 100%; + overflow: hidden; } .card-container img { @@ -32,9 +33,8 @@ position: relative; width: 100%; height: 45px; - bottom: 60px; + bottom: 55px; background: rgba(87, 87, 87, 0.70); - backdrop-filter: blur(27.5px); display: inline-flex; flex-wrap: wrap; flex-direction: column; @@ -67,4 +67,26 @@ height: 1.8625rem; background-color: #fff; border-radius: 10px; -} \ No newline at end of file + cursor: pointer; +} + +.azul { + border: 4px solid #5ee0f9; +} + +.verde { + border: 4px solid #5ef973; +} + +.vermelho { + border: 4px solid #fd3434; +} + + +.blur { + backdrop-filter: blur(27.5px); +} + +/* .default { + border: 4px solid #444444; +} */ \ No newline at end of file diff --git a/src/components/card/card.stories.ts b/src/components/card/card.stories.ts index 21ced85..8a784ef 100644 --- a/src/components/card/card.stories.ts +++ b/src/components/card/card.stories.ts @@ -10,10 +10,22 @@ const meta = { return card(args); }, argTypes: { - nome: {description: 'Nome do objeto de avatar'}, - img: {description: 'endereço para a imagem do avatar'}, - cargo: {description: 'cargo do objeto de avatar'}, - idade: {description: 'Idade do objeto de avatar'} + nome: { description: 'Nome do objeto de avatar' }, + img: { description: 'endereço para a imagem do avatar' }, + cargo: { description: 'cargo do objeto de avatar' }, + idade: { description: 'Idade do objeto de avatar' }, + cor: { + control: { type: 'select' }, + options: ['azul', 'verde', 'vermelho', 'default'], + default: "default", + description: "Cor da borda", + + }, + blur: { + control: {type: 'radio'}, + options: ['blur', "Sem Blur"], + description: "Ativação do blur nas informações do card" + } } } satisfies Meta; @@ -23,8 +35,8 @@ type Story = StoryObj; // More on writing stories with args: https://storybook.js.org/docs/html/writing-stories/args export const Primary: Story = { args: { - nome: 'Polvo', - img: 'https://github.githubassets.com/assets/mona-loading-dark-7701a7b97370.gif', + nome: 'Polvo', + img: 'https://github.githubassets.com/assets/mona-loading-dark-7701a7b97370.gif', cargo: 'Emoji Github', idade: 20 } @@ -35,7 +47,8 @@ export const Wikipedia: Story = { nome: "João Vitor", img: 'https://avatars.githubusercontent.com/u/84153149?v=4', cargo: "Wikipedia", - idade: 20 + idade: 20, + cor: 'azul' } } diff --git a/src/components/card/index.js b/src/components/card/index.js index 98f1f0e..c2434b6 100644 --- a/src/components/card/index.js +++ b/src/components/card/index.js @@ -7,15 +7,17 @@ import './card.css'; * @property { string } CardProps.cargo * @property { string } CardProps.img * @property {string} CardProps.idade + * @property {Selection} CardProps.cor + * @property {boolean} CardProps.blur * @param { CardProps } props */ -export function card({ nome, cargo, img, idade }) { +export function card({ nome, cargo, img, idade, cor, blur }) { return ` -
+
${avatar({ imgSrc: img, descricao: "", link: "" })} -