Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(react-components): rewrite React components using mui
chore: remove circular dependency
- Loading branch information
Showing
105 changed files
with
1,824 additions
and
3,285 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
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
export * from './callout-extension'; | ||
export type { CalloutExtensionAttributes, CalloutOptions } from './callout-types'; |
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
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
19 changes: 19 additions & 0 deletions
19
packages/remirror__react-components/src/button-groups/basic-formatting-button-group.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,19 @@ | ||
import React, { FC, ReactNode } from 'react'; | ||
|
||
import { ToggleBoldButton, ToggleItalicButton, ToggleUnderlineButton } from '../buttons'; | ||
import { CommandButtonGroup } from './command-button-group'; | ||
|
||
export interface BasicFormattingButtonGroupProps { | ||
children?: ReactNode | ReactNode[]; | ||
} | ||
|
||
export const BasicFormattingButtonGroup: FC<BasicFormattingButtonGroupProps> = ({ children }) => { | ||
return ( | ||
<CommandButtonGroup> | ||
<ToggleBoldButton /> | ||
<ToggleItalicButton /> | ||
<ToggleUnderlineButton /> | ||
{children} | ||
</CommandButtonGroup> | ||
); | ||
}; |
25 changes: 25 additions & 0 deletions
25
packages/remirror__react-components/src/button-groups/callout-type-button-group.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,25 @@ | ||
import React, { FC, ReactNode } from 'react'; | ||
|
||
import { ToggleCalloutButton } from '../buttons'; | ||
import { CommandButtonGroup } from './command-button-group'; | ||
|
||
export interface CalloutTypeButtonGroupProps { | ||
children?: ReactNode | ReactNode[]; | ||
} | ||
|
||
const INFO_CALLOUT = { type: 'info' }; | ||
const WARNING_CALLOUT = { type: 'warning' }; | ||
const ERROR_CALLOUT = { type: 'error' }; | ||
const SUCCESS_CALLOUT = { type: 'success' }; | ||
|
||
export const CalloutTypeButtonGroup: FC<CalloutTypeButtonGroupProps> = ({ children }) => { | ||
return ( | ||
<CommandButtonGroup> | ||
<ToggleCalloutButton attrs={INFO_CALLOUT} /> | ||
<ToggleCalloutButton attrs={WARNING_CALLOUT} /> | ||
<ToggleCalloutButton attrs={ERROR_CALLOUT} /> | ||
<ToggleCalloutButton attrs={SUCCESS_CALLOUT} /> | ||
{children} | ||
</CommandButtonGroup> | ||
); | ||
}; |
21 changes: 21 additions & 0 deletions
21
packages/remirror__react-components/src/button-groups/command-button-group.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,21 @@ | ||
import { Box, BoxProps } from '@mui/material'; | ||
import React, { FC, ReactNode } from 'react'; | ||
|
||
export interface CommandButtonGroupProps extends Omit<BoxProps, 'children'> { | ||
children: ReactNode | ReactNode[]; | ||
} | ||
|
||
export const CommandButtonGroup: FC<CommandButtonGroupProps> = (props) => { | ||
return ( | ||
<Box | ||
sx={{ | ||
display: 'flex', | ||
alignItems: 'center', | ||
width: 'fit-content', | ||
bgcolor: 'background.paper', | ||
color: 'text.secondary', | ||
}} | ||
{...props} | ||
/> | ||
); | ||
}; |
19 changes: 19 additions & 0 deletions
19
packages/remirror__react-components/src/button-groups/data-transfer-button-group.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,19 @@ | ||
import React, { FC, ReactNode } from 'react'; | ||
|
||
import { CopyButton, CutButton, PasteButton } from '../buttons'; | ||
import { CommandButtonGroup } from './command-button-group'; | ||
|
||
export interface DataTransferButtonGroupProps { | ||
children?: ReactNode | ReactNode[]; | ||
} | ||
|
||
export const DataTransferButtonGroup: FC<DataTransferButtonGroupProps> = ({ children }) => { | ||
return ( | ||
<CommandButtonGroup> | ||
<CopyButton /> | ||
<CutButton /> | ||
<PasteButton /> | ||
{children} | ||
</CommandButtonGroup> | ||
); | ||
}; |
Oops, something went wrong.