-
-
Notifications
You must be signed in to change notification settings - Fork 300
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add high light component * add tabs * remove log * improve highlight support Co-authored-by: shinework <[email protected]>
- Loading branch information
Showing
13 changed files
with
96 additions
and
38 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import React from 'react' | ||
import { useInteractive } from '~hooks/useInteractive' | ||
import { Box, Highlight } from '@chakra-ui/react' | ||
|
||
const HighlightPreview: React.FC<IPreviewProps> = ({ component }) => { | ||
const { props, ref } = useInteractive(component, true, true) | ||
|
||
return ( | ||
<Box {...props} ref={ref}> | ||
<Highlight {...component.props} styles={component.props} /> | ||
</Box> | ||
) | ||
} | ||
|
||
export default HighlightPreview |
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
8 changes: 1 addition & 7 deletions
8
src/components/inspector/panels/components/FormErrorMessagePanel.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 |
---|---|---|
@@ -1,12 +1,6 @@ | ||
import React from 'react' | ||
import ChildrenControl from '~components/inspector/controls/ChildrenControl' | ||
|
||
const FormErrorMessagePanel = () => { | ||
return ( | ||
<> | ||
<ChildrenControl /> | ||
</> | ||
) | ||
} | ||
const FormErrorMessagePanel = () => <ChildrenControl /> | ||
|
||
export default FormErrorMessagePanel |
12 changes: 12 additions & 0 deletions
12
src/components/inspector/panels/components/HighlightPanel.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,12 @@ | ||
import { memo } from 'react' | ||
import ChildrenControl from '~components/inspector/controls/ChildrenControl' | ||
import TextControl from '~components/inspector/controls/TextControl' | ||
|
||
const HighlightPanel = () => ( | ||
<> | ||
<ChildrenControl /> | ||
<TextControl label="Query" name="query" /> | ||
</> | ||
) | ||
|
||
export default memo(HighlightPanel) |
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