-
Notifications
You must be signed in to change notification settings - Fork 157
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
30 changed files
with
1,524 additions
and
1,455 deletions.
There are no files selected for viewing
File renamed without changes
Binary file modified
BIN
+6.74 KB
(100%)
packages/fuselage/.loki/reference/chrome_iphone7_Data_Display_Avatar_Stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+5.64 KB
(100%)
...s/fuselage/.loki/reference/chrome_iphone7_Data_Display_Avatar_Stack_Rounded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-18.2 KB
packages/fuselage/.loki/reference/chrome_iphone7_Misc_Options_OptionAvatar.png
Binary file not shown.
File renamed without changes
Binary file modified
BIN
+1.92 KB
(100%)
packages/fuselage/.loki/reference/chrome_laptop_Data_Display_Avatar_Stack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+2.15 KB
(100%)
...es/fuselage/.loki/reference/chrome_laptop_Data_Display_Avatar_Stack_Rounded.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed
BIN
-7.81 KB
packages/fuselage/.loki/reference/chrome_laptop_Misc_Options_OptionAvatar.png
Binary file not shown.
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
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,11 @@ | ||
import React from 'react'; | ||
|
||
import { Box } from '../Box'; | ||
|
||
export const Modal = React.forwardRef(({ children, ...props }, ref) => ( | ||
<Box is='dialog' rcx-modal {...props}> | ||
<Box ref={ref} rcx-modal__inner elevation='2'> | ||
{children} | ||
</Box> | ||
</Box> | ||
)); |
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 ReactDOM from 'react-dom'; | ||
|
||
import { Modal } from '../..'; | ||
|
||
it('renders without crashing', () => { | ||
const div = document.createElement('div'); | ||
ReactDOM.render(<Modal />, div); | ||
ReactDOM.unmountComponentAtNode(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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import React from 'react'; | ||
|
||
import { ButtonGroup, Button, Modal } from '../..'; | ||
|
||
export default { | ||
title: 'Containers/Modal', | ||
component: Modal, | ||
parameters: { | ||
jest: ['Modal/Modal.spec.js'], | ||
}, | ||
}; | ||
|
||
export const _Modal = () => ( | ||
<Modal> | ||
<Modal.Header> | ||
<Modal.Thumb url='data:image/gif;base64,R0lGODlhAQABAIAAAMLCwgAAACH5BAAAAAAALAAAAAABAAEAAAICRAEAOw==' /> | ||
<Modal.Title>Modal Header</Modal.Title> | ||
<Modal.Close /> | ||
</Modal.Header> | ||
<Modal.Content>Modal Body</Modal.Content> | ||
<Modal.Footer> | ||
<ButtonGroup align='end'> | ||
<Button>Cancel</Button> | ||
<Button primary>Submit</Button> | ||
</ButtonGroup> | ||
</Modal.Footer> | ||
</Modal> | ||
); |
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,74 @@ | ||
@use '../../styles/colors.scss'; | ||
@use '../../styles/lengths.scss'; | ||
@use '../../styles/typography.scss'; | ||
|
||
.rcx-modal { | ||
position: static; | ||
|
||
display: flex; | ||
|
||
width: 100%; | ||
max-height: 100%; | ||
margin: auto; | ||
|
||
background: none; | ||
|
||
&__inner { | ||
display: flex; | ||
flex-direction: column; | ||
flex-grow: 1; | ||
|
||
min-width: 0; | ||
padding: 0; | ||
|
||
color: colors.foreground(default); | ||
border-radius: 2px; | ||
background-color: colors.surface(); | ||
@include typography.use-font-scale(p1); | ||
} | ||
|
||
&__header { | ||
margin: 32px; | ||
} | ||
|
||
&__header-inner { | ||
display: flex; | ||
flex-wrap: nowrap; | ||
align-items: center; | ||
|
||
margin: -8px; | ||
} | ||
|
||
&__title { | ||
@include typography.use-text-ellipsis; | ||
flex-grow: 1; | ||
flex-shrink: 1; | ||
|
||
white-space: nowrap; | ||
|
||
color: colors.foreground('default'); | ||
@include typography.use-font-scale(h1); | ||
} | ||
|
||
&__backdrop { | ||
position: fixed; | ||
|
||
z-index: 100; | ||
inset: 0; | ||
|
||
background-color: colors.neutral(800, $alpha: 0.5); | ||
} | ||
|
||
&__footer { | ||
margin: 32px; | ||
} | ||
|
||
&__content-wrapper { | ||
margin-inline: 32px; | ||
} | ||
|
||
@include on-breakpoint(sm) { | ||
max-width: lengths.size(640); | ||
padding: lengths.padding(16); | ||
} | ||
} |
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,5 @@ | ||
import React from 'react'; | ||
|
||
import { Box } from '../Box'; | ||
|
||
export const ModalBackdrop = (props) => <Box rcx-modal__backdrop {...props} />; |
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 { Button } from '../Button'; | ||
import { Icon } from '../Icon'; | ||
|
||
export const ModalClose = (props) => ( | ||
<Button small ghost flexShrink={0} {...props}> | ||
<Icon name='cross' size='x24' /> | ||
</Button> | ||
); |
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,13 @@ | ||
import React from 'react'; | ||
|
||
import { Box, Scrollable } from '../Box'; | ||
|
||
export const ModalContent = ({ children, onScrollContent, ...props }) => ( | ||
<Scrollable vertical onScrollContent={onScrollContent}> | ||
<Box rcx-modal__content> | ||
<Box rcx-modal__content-wrapper {...props}> | ||
{children} | ||
</Box> | ||
</Box> | ||
</Scrollable> | ||
); |
Oops, something went wrong.