forked from gravitational/teleport
-
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.
Update README and convert Alert, Button to CSF (gravitational#5)
* Convert Alert, Button to CSF * Prettify and replace div wrappers w/ fragments * Update README to include prettify setup Part of: gravitational/webapps#3
- Loading branch information
Lisa Kim
authored
Jan 22, 2020
1 parent
bf0a6dd
commit 8d6573b
Showing
11 changed files
with
251 additions
and
120 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,35 @@ | ||
/* | ||
Copyright 2019 Gravitational, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import Alert from './index'; | ||
|
||
export default { | ||
title: 'Design/Alert', | ||
component: Alert, | ||
}; | ||
|
||
export const Default = () => <Alert>Default is danger</Alert>; | ||
|
||
export const Danger = () => <Alert kind="danger">Some error message</Alert>; | ||
|
||
export const Warning = () => <Alert kind="warning">Some warning message</Alert>; | ||
|
||
export const Informational = () => ( | ||
<Alert kind="info">Some informational message</Alert> | ||
); | ||
|
||
export const Success = () => <Alert kind="success">Some success message</Alert>; |
This file was deleted.
Oops, something went wrong.
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,66 @@ | ||
/* | ||
Copyright 2019 Gravitational, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import Button, { | ||
ButtonPrimary, | ||
ButtonSecondary, | ||
ButtonWarning, | ||
} from './Button'; | ||
|
||
export default { | ||
title: 'Design/Button', | ||
}; | ||
|
||
export const Basics = () => ( | ||
<> | ||
<div> | ||
<ButtonPrimary mr={3}>Primary</ButtonPrimary> | ||
<ButtonSecondary mr={3}>Secondary</ButtonSecondary> | ||
<ButtonWarning>Warning</ButtonWarning> | ||
</div> | ||
<div> | ||
<Button size="large" mr={3} mt={5}> | ||
Large | ||
</Button> | ||
<Button size="medium" mr={3}> | ||
Medium | ||
</Button> | ||
<Button size="small">Small</Button> | ||
</div> | ||
</> | ||
); | ||
|
||
export const Block = () => ( | ||
<> | ||
<Button block mb={3}> | ||
Primary Block Button | ||
</Button> | ||
<ButtonSecondary block mb={3}> | ||
Secondary Block Button | ||
</ButtonSecondary> | ||
<ButtonWarning block>Warning Block Button</ButtonWarning> | ||
</> | ||
); | ||
|
||
export const States = () => ( | ||
<> | ||
<Button mr={3} disabled> | ||
Disabled | ||
</Button> | ||
<Button autoFocus>Focused</Button> | ||
</> | ||
); |
This file was deleted.
Oops, something went wrong.
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,62 @@ | ||
/* | ||
Copyright 2019 Gravitational, Inc. | ||
Licensed under the Apache License, Version 2.0 (the "License"); | ||
you may not use this file except in compliance with the License. | ||
You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
import React from 'react'; | ||
import ButtonIcon from './ButtonIcon'; | ||
import { AddUsers, Trash, Ellipsis } from './../Icon'; | ||
import Flex from './../Flex'; | ||
|
||
export default { | ||
title: 'Design/Button', | ||
}; | ||
|
||
export const Icons = () => ( | ||
<> | ||
<Flex mb={3}> | ||
<ButtonIcon size={2}> | ||
<AddUsers /> | ||
</ButtonIcon> | ||
<ButtonIcon size={2}> | ||
<Ellipsis /> | ||
</ButtonIcon> | ||
<ButtonIcon size={2}> | ||
<Trash /> | ||
</ButtonIcon> | ||
</Flex> | ||
<Flex mb={4}> | ||
<ButtonIcon size={1}> | ||
<AddUsers /> | ||
</ButtonIcon> | ||
<ButtonIcon size={1}> | ||
<Ellipsis /> | ||
</ButtonIcon> | ||
<ButtonIcon size={1}> | ||
<Trash /> | ||
</ButtonIcon> | ||
</Flex> | ||
<Flex> | ||
<ButtonIcon size={0}> | ||
<AddUsers /> | ||
</ButtonIcon> | ||
<ButtonIcon size={0}> | ||
<Ellipsis /> | ||
</ButtonIcon> | ||
<ButtonIcon size={0}> | ||
<Trash /> | ||
</ButtonIcon> | ||
</Flex> | ||
</> | ||
); |
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.