-
-
Notifications
You must be signed in to change notification settings - Fork 269
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Coverted all the css into Tailwind css of Modal component #1743
Merged
kylemh
merged 27 commits into
OperationCode:main
from
subhajit20:subhajit20/Replace-all-styling-with-Tailwind
Sep 23, 2023
Merged
Changes from all commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
42bf6db
Converted all the css to tailwind css of ErrorDisplay page
subhajit20 827b21d
Converted all the css to tailwind css of ErrorDisplay page
subhajit20 dc7b10e
Converted all css to tailwind css
subhajit20 23a6499
Replace all styling with Tailwind
subhajit20 1055b07
Replace all styling with Tailwind
subhajit20 1299eac
Converted all the css into tailwind css of Badge component
subhajit20 71a9b5c
Merge branch 'main' into subhajit20/Replace-all-styling-with-Tailwind
subhajit20 46f136d
Converted all the css into Tailwind css of Badge component
subhajit20 be04445
Merge branch 'main' into subhajit20/Replace-all-styling-with-Tailwind
subhajit20 7462502
Update components/Badge/Badge.js
subhajit20 e67dbca
Fixed syntax error
subhajit20 b7ec44a
Merge remote-tracking branch 'origin/main' into subhajit20/Replace-al…
kylemh d371d87
resolve styling problems
kylemh 44f4e1b
Convert all the css into tailwind css of SocialMedia component
subhajit20 1339530
Convert all the css into tailwind css of SocialMedia component
subhajit20 96d04fc
Merge branch 'main' into subhajit20/Replace-all-styling-with-Tailwind
subhajit20 116d86b
Update components/SocialMedia/SocialMediaItem/SocialMediaItem.js
subhajit20 0e2a6d0
Convert all the css into tailwind css of SocialMedia component
subhajit20 b59594e
Converted all the css into tailwind css of Modal component
subhajit20 c377581
Merge branch 'main' into subhajit20/Replace-all-styling-with-Tailwind
subhajit20 71dbf56
Converted all the css into tailwind css of Modal compononent
subhajit20 db5f1b7
Converted all the css into tailwind css of Modal compononent
subhajit20 cd9ceca
Converted all the css into tailwind css of Modal compononent
subhajit20 ed3a348
remove dumb lint rule
kylemh 310f33d
integrate tailwind into Storybook
kylemh 75d204b
update modal API and fix issue where modal would not render
kylemh b518d21
update snapshot tests
kylemh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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 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 |
---|---|---|
@@ -1,49 +1,78 @@ | ||
import { useState } from 'react'; | ||
import isChromatic from 'chromatic/isChromatic'; | ||
|
||
import { descriptions } from 'common/constants/descriptions'; | ||
import Button from 'components/Buttons/Button/Button'; | ||
import Modal from '../Modal'; | ||
|
||
export const Default = { | ||
render: args => { | ||
const [isDemoModalOpen, setIsDemoModalOpen] = useState(args.isOpen); | ||
|
||
return ( | ||
<Modal | ||
{...args} | ||
isOpen={isDemoModalOpen} | ||
onRequestClose={prevValue => setIsDemoModalOpen(!prevValue)} | ||
/> | ||
<> | ||
<Button onClick={() => setIsDemoModalOpen(true)}>Open Modal</Button> | ||
|
||
<Modal | ||
{...args} | ||
isOpen={isDemoModalOpen} | ||
onRequestClose={prevValue => setIsDemoModalOpen(!prevValue)} | ||
/> | ||
</> | ||
); | ||
}, | ||
args: { | ||
isOpen: true, | ||
isOpen: !!isChromatic(), | ||
children: descriptions.medium, | ||
screenReaderLabel: 'You have completed the form.', | ||
}, | ||
}; | ||
|
||
export const NoCloseOnOverlayClick = { | ||
export const NonDismissableModal = { | ||
render: args => { | ||
const [isDemoModalOpen, setIsDemoModalOpen] = useState(args.isOpen); | ||
|
||
return ( | ||
<Modal | ||
{...args} | ||
isOpen={isDemoModalOpen} | ||
onRequestClose={prevValue => setIsDemoModalOpen(!prevValue)} | ||
/> | ||
<> | ||
<Button onClick={() => setIsDemoModalOpen(true)}>Open Modal</Button> | ||
|
||
<Modal | ||
{...args} | ||
isOpen={isDemoModalOpen} | ||
onRequestClose={prevValue => setIsDemoModalOpen(!prevValue)} | ||
/> | ||
</> | ||
); | ||
}, | ||
args: { | ||
shouldCloseOnOverlayClick: false, | ||
isOpen: true, | ||
children: descriptions.medium, | ||
canClose: false, | ||
isOpen: false, | ||
children: ( | ||
<> | ||
<p> | ||
This modal will not close once opened. You must reload the page to reset the state in | ||
Storybook. | ||
</p> | ||
<p>{descriptions.medium}</p> | ||
</> | ||
), | ||
screenReaderLabel: 'You have completed the form.', | ||
}, | ||
}; | ||
|
||
const meta = { | ||
title: 'Modal', | ||
component: Modal, | ||
parameters: { | ||
previewTabs: { | ||
'storybook/docs/panel': { hidden: true }, | ||
}, | ||
docs: { | ||
autodocs: false, | ||
disable: true, | ||
page: null, | ||
}, | ||
}, | ||
}; | ||
|
||
export default meta; |
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 |
---|---|---|
|
@@ -18,6 +18,7 @@ module.exports = { | |
extend: { | ||
colors: { | ||
themeGray: '#121212', | ||
secondary: '#252e3e', | ||
}, | ||
}, | ||
}, | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @subhajit20 ! I dove into this one rather than spend more of your time than you bargained for...
The issue where the modal was not rendering is explained because we use
'#__next'
in the "important" config. Radix's Dialog component uses React Portal to render as a direct child ofbody
rather than the div with the#__next
ID (as screenshotted). We needed to specifiy thecontainer
prop on theDialog.Portal
component so that Tailwind's styles actually applied!I also made it so Tailwind works in Storybook.
I made some other changes, but nothing you need to worry about! Great work again.