-
Notifications
You must be signed in to change notification settings - Fork 18
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
Docs: add enterprise admonition #1198
Merged
Merged
Changes from 6 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1e697b9
adds enterprise admonition
ZPain8464 49c7548
adds inline styling
ZPain8464 54d03cb
adds styling to component
ZPain8464 54d9fa9
swaps material ui icon
ZPain8464 2edc65c
adds enterprise admonition examples
ZPain8464 b184e7f
swaps mui icon and deletes gif example
ZPain8464 bc17707
adds dark mode colors
ZPain8464 aaf40ca
updates dark mode palette
ZPain8464 371e5ef
simplify dark mode styling
kenjenkins 2763c12
updates hex code
ZPain8464 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import React from 'react'; | ||
import DefaultAdmonitionTypes from '@theme-original/Admonition/Types'; | ||
import BusinessIcon from '@mui/icons-material/Business'; | ||
|
||
import './types.css'; | ||
|
||
function EnterpriseAdmonition(props) { | ||
return ( | ||
<div className="custom_admonition"> | ||
<div className="custom_admonition_header"> | ||
<span><BusinessIcon style={{color: 'rgb(86 83 83)'}}/></span> | ||
<h5>{props.title}</h5> | ||
</div> | ||
<div className="custom_admonition_text"> | ||
<p>{props.children}</p> | ||
</div> | ||
</div> | ||
); | ||
} | ||
|
||
const AdmonitionTypes = { | ||
...DefaultAdmonitionTypes, | ||
'enterprise': EnterpriseAdmonition, | ||
} | ||
|
||
export default AdmonitionTypes; |
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,27 @@ | ||
.custom_admonition { | ||
border: #ededed 1px solid; | ||
border-left: #6F43E7 solid 4px; | ||
border-radius: 10px; | ||
margin: 0 0 16px 0; | ||
padding: 16px; | ||
background-color: #f6f3ff; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
} | ||
|
||
.custom_admonition_header { | ||
display: flex; | ||
justify-content: flex-start; | ||
} | ||
|
||
.custom_admonition_header span { | ||
margin-right: 5px; | ||
} | ||
|
||
.custom_admonition_header h5 { | ||
color: #6F43E7; | ||
font-size: 16px; | ||
} | ||
|
||
.custom_admonition_text p { | ||
margin: 0 0 0 0; | ||
font-size: 16px; | ||
} |
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.
If we're going to add a separate CSS file for this component, can it be scoped to just this component? (See src/theme/Footer/Logo/index.js for an example of using a CSS module.)