forked from vczb/sagu-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
841 additions
and
17 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
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 @@ | ||
*.hbs |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
module.exports = function (plop) { | ||
plop.setGenerator('component', { | ||
description: 'application component', | ||
|
||
// inquirer prompts | ||
prompts: [ | ||
{ | ||
type: 'input', | ||
name: 'name', | ||
message: 'component name?' | ||
} | ||
], | ||
|
||
// actions to perform | ||
actions: [ | ||
{ | ||
type: 'add', | ||
path: '../src/packages/{{pascalCase name}}/index.tsx', | ||
templateFile: 'templates/index.tsx.hbs' | ||
}, | ||
{ | ||
type: 'add', | ||
path: '../src/packages/{{pascalCase name}}/stories.tsx', | ||
templateFile: 'templates/stories.tsx.hbs' | ||
}, | ||
{ | ||
type: 'add', | ||
path: '../src/packages/{{pascalCase name}}/styles.ts', | ||
templateFile: 'templates/styles.ts.hbs' | ||
} | ||
] | ||
}) | ||
} |
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,10 @@ | ||
import React from 'react' | ||
import * as S from './styles' | ||
|
||
const {{pascalCase name}} = () => ( | ||
<S.Wrapper> | ||
<h1>{{pascalCase name}}</h1> | ||
</S.Wrapper> | ||
) | ||
|
||
export default {{pascalCase name}} |
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,10 @@ | ||
import React from 'react' | ||
import { Story, Meta } from '@storybook/react/types-6-0' | ||
import Tag from '.' | ||
|
||
export default { | ||
title: 'Tag', | ||
component: Tag | ||
} as Meta | ||
|
||
export const Default: Story = (args) => <Tag {...args} /> |
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,3 @@ | ||
import styled from 'styled-components' | ||
|
||
export const Wrapper = styled.div`` |
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
Oops, something went wrong.