Skip to content

Commit

Permalink
Merge pull request #54 from reg-viz/chore/scaffdog-templates
Browse files Browse the repository at this point in the history
chore: update scaffdog template
  • Loading branch information
wadackel committed Apr 14, 2024
2 parents a52570a + 2e25487 commit ce8cc6d
Showing 1 changed file with 16 additions and 9 deletions.
25 changes: 16 additions & 9 deletions .scaffdog/ui-component.md
Expand Up @@ -24,18 +24,25 @@ export * from './{{ name }}';

```typescript
import React from 'react';
import styled from 'styled-components';
import { Space } from '{{ relative "../src/styles/variables" }}';

const Wrapper = styled.div`
margin: ${Space}px;
`;
import * as styles from './{{ name }}.css';

export type Props = React.PropsWithChildren<{}>;

export const {{ name }} = ({ children, ...rest }: Props) => (
<Wrapper {...rest}>{children}</Wrapper>
);
export const {{ name }} = ({ children, ...rest }: Props) => {
return (
<div {...rest} className={styles.wrapper}>{children}</div>
);
};
```

# `{{ name }}/{{ name }}.css.ts`

```typescript
import { style } from '@vanilla-extract/css';

export const wrapper = style({
// TODO: Add styles
});
```

# `{{ name }}/{{ name }}.stories.tsx`
Expand Down

0 comments on commit ce8cc6d

Please sign in to comment.