Skip to content

Commit

Permalink
feat: export css, keyframes
Browse files Browse the repository at this point in the history
  • Loading branch information
wwsun committed Mar 25, 2022
1 parent 2af93f1 commit a6ce56f
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 19 deletions.
3 changes: 1 addition & 2 deletions docs/box.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { Box, Button, Link } from 'coral-system';
import { css } from 'styled-components';
import { Box, Button, Link, css } from 'coral-system';

export default {
title: 'Box',
Expand Down
2 changes: 1 addition & 1 deletion docs/center.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export default {
component: Center,
};

export const Baisc = (args: any) => (
export const Basic = (args: any) => (
<Center bg="tomato" height="100px" color="white">
This is the Center
</Center>
Expand Down
3 changes: 1 addition & 2 deletions docs/coral.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import { coral } from 'coral-system';
import { css } from 'styled-components';
import { coral, css } from 'coral-system';

export default {
title: 'coral factory',
Expand Down
22 changes: 12 additions & 10 deletions docs/flex.stories.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import React from 'react';
import styled from 'styled-components';
import { FlexItem, Flex, Box } from 'coral-system';
import { Flex, FlexItem, Box, coral, css } from 'coral-system';

export default {
title: 'Flex',
Expand Down Expand Up @@ -36,14 +35,17 @@ export const VerticalStack = (args: any) => (
</Flex>
);

const Example = styled.div`
.flex-item {
padding: 12px 0;
background-color: #ddd;
border: 1px solid #ccc;
text-align: center;
}
`;
const Example = coral(
'div',
css`
.flex-item {
padding: 12px 0;
background-color: #ddd;
border: 1px solid #ccc;
text-align: center;
}
`,
);

export const EqualCols = (args: any) => (
<Example>
Expand Down
2 changes: 1 addition & 1 deletion src/components/flex.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { css } from 'styled-components';
import { Box } from './box';
import { space, toPercent, toNumber } from '../helpers';
import { useSystem } from '../provider';
import { forwardRef } from '../forwad-ref';
import { forwardRef } from '../forward-ref';
import type { StringOrNumber, CoralProps, HTMLCoralProps } from '../types';

export interface FlexProps extends HTMLCoralProps<'div'> {
Expand Down
2 changes: 1 addition & 1 deletion src/components/grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';
import { Box } from './box';
import { isNumber, space } from '../helpers';
import { useSystem } from '../provider';
import { forwardRef } from '../forwad-ref';
import { forwardRef } from '../forward-ref';
import type { StringOrNumber, CoralProps, HTMLCoralProps } from '../types';

export interface GridProps extends HTMLCoralProps<'div'> {
Expand Down
2 changes: 1 addition & 1 deletion src/components/group.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { HTMLCoralProps, StringOrNumber } from '../types';
import { space } from '../helpers';
import { Box } from './box';
import { useSystem } from '../provider';
import { forwardRef } from '../forwad-ref';
import { forwardRef } from '../forward-ref';

const attachedStyle = css`
> *:first-child:not(:last-child) {
Expand Down
File renamed without changes.
3 changes: 2 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,6 @@ export * from './coral';
export * from './theme';
export * from './components';
export * from './provider';
export * from './forwad-ref';
export * from './forward-ref';
export { css, keyframes } from 'styled-components';
export type { SystemProps, CoralProps, HTMLCoralProps } from './types';

0 comments on commit a6ce56f

Please sign in to comment.