-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
6 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import React from "react"; | ||
import styled from "styled-components"; | ||
/* eslint-disable import/no-unresolved */ | ||
import { Meta } from "@storybook/react/types-6-0"; | ||
import Card from "./index"; | ||
|
||
const Row = styled.div` | ||
margin-bottom: 32px; | ||
& > button + button { | ||
margin-left: 16px; | ||
} | ||
`; | ||
|
||
export default { | ||
title: "Card", | ||
component: Card, | ||
argTypes: {}, | ||
} as Meta; | ||
|
||
export const Default: React.FC = () => { | ||
return ( | ||
<> | ||
<Row> | ||
<Card>Card</Card> | ||
</Row> | ||
</> | ||
); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import styled, { DefaultTheme } from "styled-components"; | ||
|
||
interface CardProps { | ||
theme: DefaultTheme; | ||
} | ||
|
||
const Card = styled.div<CardProps>` | ||
background-color: ${({ theme }) => theme.colors.card.background}; | ||
border: 1px solid ${({ theme }) => theme.colors.card.borderColor}; | ||
border-radius: 32px; | ||
box-shadow: ${({ theme }) => theme.shadows.level1}; | ||
color: ${({ theme }) => theme.colors.text}; | ||
padding: 24px; | ||
`; | ||
|
||
export default Card; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters