Skip to content
This repository was archived by the owner on May 25, 2026. It is now read-only.
Open
Show file tree
Hide file tree
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
25 changes: 25 additions & 0 deletions src/components/Button/Button.stories.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import type { Meta, StoryObj } from '@storybook/react'
import { ButtonProps } from './Button.types'
import { Button } from './Button'

// More on how to set up stories at: https://storybook.js.org/docs/7.0/react/writing-stories/introduction
const meta: Meta<ButtonProps> = {
title: 'Example/Button',
component: Button,
tags: ['autodocs'],
argTypes: {
label: {
type: 'string',
},
},
}

export default meta
type Story = StoryObj<ButtonProps>

// More on writing stories with args: https://storybook.js.org/docs/7.0/react/writing-stories/args
export const Primary: Story = {
args: {
label: 'Button',
},
}
7 changes: 7 additions & 0 deletions src/components/Button/Button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import * as S from './style'
import { ButtonProps } from './Button.types'


export const Button = ({label, ...props}:ButtonProps) => {
return <S.Button {...props}>{label}</S.Button>
}
4 changes: 4 additions & 0 deletions src/components/Button/Button.types.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
import { ButtonHTMLAttributes } from "react";
export type ButtonProps = ButtonHTMLAttributes<HTMLButtonElement> & {
label: string
}
19 changes: 19 additions & 0 deletions src/components/Button/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import styled from 'styled-components'

export const Button = styled.button`
font-size: 16px;
color: #DEB4FF;
width: 121px;
height: 35px;
border: 1px solid #DEB4FF;
background: none;
border-radius: 3px;

&:hover {
background-color: #DEB4FF;
color: #161217;
}

`


4 changes: 4 additions & 0 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import Head from 'next/head'
import * as S from '../styles/pages/Home'
import { Button } from 'src/components/Button/style'


export default function Home() {
return (
Expand All @@ -11,7 +13,9 @@ export default function Home() {
<link rel="icon" href="/favicon.ico" />
</Head>
<main>

<S.Hero>Open Start</S.Hero>
<Button>Login</Button>
</main>
</>
)
Expand Down
6 changes: 4 additions & 2 deletions src/styles/Globals.ts
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
import { createGlobalStyle } from 'styled-components'

const GlobalStyle = createGlobalStyle`
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@500&display=swap');
html,
body {
padding: 0;
margin: 0;
background: black;
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen,
Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;


}
a {
color: inherit;
text-decoration: none;
}
* {
box-sizing: border-box;
font-family: 'Inter', sans-serif;
}
`

Expand Down
72 changes: 43 additions & 29 deletions tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,32 +1,46 @@
{
"compilerOptions": {
Comment thread
mateusmoov marked this conversation as resolved.
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"baseUrl": ".",
"paths": {
"@components/*": ["components/*"],
"@utils/*": ["utils/*"],
"@lib/*": ["lib/*"],
"@services/*": ["services/*"]
},
"incremental": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"src/pages/_document.tss"
"compilerOptions": {
"target": "es5",
"lib": [
"dom",
"dom.iterable",
"esnext"
],
"exclude": ["node_modules"]
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"baseUrl": ".",
"paths": {
"@components/*": [
"components/*"
],
"@utils/*": [
"utils/*"
],
"@lib/*": [
"lib/*"
],
"@services/*": [
"services/*"
]
},
"incremental": true
},
"include": [
"next-env.d.ts",
"**/*.ts",
"**/*.tsx",
"src/pages/_document.tss"
],
"exclude": [
"node_modules"
]
}