-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #96 from 8845musign/add-new-page
Add <Pre> and Update Modals and Upgarde icons
- Loading branch information
Showing
33 changed files
with
599 additions
and
22 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
10 changes: 10 additions & 0 deletions
10
public/assets/images/components/modals/hero-placeholder.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,76 @@ | ||
/* Andy-set-studio/modern-css-reset https://github.com/Andy-set-studio/modern-css-reset */ | ||
|
||
/* Box sizing rules */ | ||
*, | ||
*::before, | ||
*::after { | ||
box-sizing: border-box; | ||
} | ||
|
||
/* Remove default margin */ | ||
body, | ||
h1, | ||
h2, | ||
h3, | ||
h4, | ||
p, | ||
figure, | ||
blockquote, | ||
dl, | ||
dd { | ||
margin: 0; | ||
} | ||
|
||
/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */ | ||
ul[role="list"], | ||
ol[role="list"] { | ||
list-style: none; | ||
} | ||
|
||
/* Set core root defaults */ | ||
html:focus-within { | ||
scroll-behavior: smooth; | ||
} | ||
|
||
/* Set core body defaults */ | ||
body { | ||
min-height: 100vh; | ||
text-rendering: optimizespeed; | ||
line-height: 1.5; | ||
} | ||
|
||
/* A elements that don't have a class get default styles */ | ||
a:not([class]) { | ||
text-decoration-skip-ink: auto; | ||
} | ||
|
||
/* Make images easier to work with */ | ||
img, | ||
picture { | ||
display: block; | ||
max-width: 100%; | ||
} | ||
|
||
/* Inherit fonts for inputs and buttons */ | ||
input, | ||
button, | ||
textarea, | ||
select { | ||
font: inherit; | ||
} | ||
|
||
/* Remove all animations and transitions for people that prefer not to see them */ | ||
@media (prefers-reduced-motion: reduce) { | ||
html:focus-within { | ||
scroll-behavior: auto; | ||
} | ||
|
||
*, | ||
*::before, | ||
*::after { | ||
transition-duration: 0.01ms !important; | ||
animation-duration: 0.01ms !important; | ||
animation-iteration-count: 1 !important; | ||
scroll-behavior: auto !important; | ||
} | ||
} |
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
46 changes: 46 additions & 0 deletions
46
src/components/react/examples/action-half-modal/StickyHeaderAndFooterExample.tsx
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,46 @@ | ||
import { ActionHalfModal } from '@ubie/ubie-ui'; | ||
import { type FC, useCallback, useState } from 'react'; | ||
|
||
export const StickyHeaderAndFooterExample: FC = () => { | ||
const [open, setOpen] = useState(true); | ||
|
||
const onClose = useCallback(() => { | ||
setOpen(false); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<button type="button" onClick={() => setOpen(true)}> | ||
Open Modal | ||
</button> | ||
<ActionHalfModal | ||
primaryActionLabel="アクション" | ||
onPrimaryAction={onClose} | ||
header="Title" | ||
open={open} | ||
onClose={onClose} | ||
stickyHeader | ||
stickyFooter | ||
> | ||
<p style={{ margin: 0 }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the | ||
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and | ||
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into | ||
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of | ||
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus | ||
PageMaker including versions of Lorem Ipsum. | ||
</p> | ||
<p style={{ margin: '12px 0 0' }}> | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin | ||
literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney | ||
College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, | ||
and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem | ||
Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of | ||
Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular | ||
during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a | ||
line in section 1.10.32. | ||
</p> | ||
</ActionHalfModal> | ||
</> | ||
); | ||
}; |
42 changes: 42 additions & 0 deletions
42
src/components/react/examples/action-half-modal/WithHeroExample.tsx
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,42 @@ | ||
import { ActionHalfModal } from '@ubie/ubie-ui'; | ||
import { type FC, useCallback, useState } from 'react'; | ||
|
||
export const WithHeroExample: FC = () => { | ||
const [open, setOpen] = useState(true); | ||
const onClose = useCallback(() => { | ||
setOpen(false); | ||
}, []); | ||
|
||
return ( | ||
<> | ||
<button type="button" onClick={() => setOpen(true)}> | ||
Open Modal | ||
</button> | ||
<ActionHalfModal | ||
hero={ | ||
<img | ||
src="/assets/images/components/modals/hero-placeholder.svg" | ||
alt="Illustration: Modal" | ||
style={{ width: '100%', height: 'auto', verticalAlign: 'bottom' }} | ||
width={560} | ||
height={315} | ||
/> | ||
} | ||
header="Title" | ||
primaryActionLabel="Action" | ||
onPrimaryAction={onClose} | ||
open={open} | ||
onClose={onClose} | ||
> | ||
<p> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the | ||
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and | ||
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into | ||
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of | ||
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus | ||
PageMaker including versions of Lorem Ipsum. | ||
</p> | ||
</ActionHalfModal> | ||
</> | ||
); | ||
}; |
41 changes: 41 additions & 0 deletions
41
src/components/react/examples/action-modal/StickyHeaderAndFooterExample.tsx
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,41 @@ | ||
import { ActionModal } from '@ubie/ubie-ui'; | ||
import { type FC, useState } from 'react'; | ||
|
||
export const StickyHeaderAndFooterExample: FC = () => { | ||
const [open, setOpen] = useState(true); | ||
|
||
return ( | ||
<> | ||
<button type="button" onClick={() => setOpen(true)}> | ||
Open Modal | ||
</button> | ||
<ActionModal | ||
header="Title" | ||
open={open} | ||
onPrimaryAction={() => setOpen(false)} | ||
onClose={() => setOpen(false)} | ||
stickyHeader | ||
stickyFooter | ||
> | ||
<p style={{ margin: 0 }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the | ||
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and | ||
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into | ||
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of | ||
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus | ||
PageMaker including versions of Lorem Ipsum. | ||
</p> | ||
<p style={{ margin: '12px 0 0' }}> | ||
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin | ||
literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney | ||
College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, | ||
and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem | ||
Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of | ||
Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular | ||
during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a | ||
line in section 1.10.32. | ||
</p> | ||
</ActionModal> | ||
</> | ||
); | ||
}; |
Oops, something went wrong.