Skip to content

Commit

Permalink
💄 feat: fix wrong className order
Browse files Browse the repository at this point in the history
  • Loading branch information
ONLY-yours committed Nov 22, 2023
1 parent ea44085 commit 9842d45
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/ActionIcon/ActionIcon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ const ActionIcon: FC<ActionIconProps> = ({
const Icon = (
<Button
icon={icon}
className={cx(className, styles.container)}
className={cx(styles.container, className)}
type={'text'}
style={{ cursor }}
size={'small'}
Expand Down
22 changes: 17 additions & 5 deletions src/Highlight/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const useStyles = createStyles(

const typeStylish = css`
background-color: ${type === 'block' ? colorFillTertiary : 'transparent'};
border: 1px solid ${type === 'block' ? colorFillTertiary : 'transparent'};
border: 1px solid ${type === 'block' ? 'transparent' : token.colorBorder};
`;

const lighterTypeStylish = css`
Expand All @@ -38,13 +38,28 @@ export const useStyles = createStyles(
}
`,
),
expland: css`
color: ${Color(colorText).alpha(0.8).hsl().string()};
`,

copy: css`
color: ${Color(colorText).alpha(0.6).hsl().string()};
`,
header: cx(
`${prefix}-header`,
css`
background-color: ${type === 'block' ? token.colorFillTertiary : 'transparent'};
padding: 4px 8px;
background: rgba(0, 0, 0, 0.02);
border-radius: ${token.borderRadius}px;
width: auto !important; // override self width
`,
css`
.${STUDIO_UI_PREFIX}-btn {
&:hover {
color: ${colorTextSecondary} !important;
}
}
`,
),
container: cx(
`${prefix}-container`,
Expand Down Expand Up @@ -106,9 +121,6 @@ export const useStyles = createStyles(
min-width: 100px;
.${STUDIO_UI_PREFIX}-btn {
color: ${colorText};
&:hover {
color: ${colorTextSecondary} !important;
}
}
.${STUDIO_UI_PREFIX}-select-selector {
padding-inline-end: 4px !important;
Expand Down
3 changes: 2 additions & 1 deletion src/Highlight/wrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const FullFeatureWrapper = memo<HighlighterWrapperProps & HighlightProps>
<div className={classNames(styles.wrapper, className)} style={style}>
<Flexbox align={'center'} className={styles.header} horizontal justify={'space-between'}>
<ActionIcon
className={styles.expland}
icon={expand ? <DownOutlined size={14} /> : <RightOutlined size={14} />}
onClick={() => setExpand(!expand)}
size={24}
Expand All @@ -73,7 +74,7 @@ export const FullFeatureWrapper = memo<HighlighterWrapperProps & HighlightProps>
suffixIcon={false}
value={lang.toLowerCase()}
/>
{copyable && <CopyButton content={children} />}
{copyable && <CopyButton className={styles.copy} content={children} />}
</Flexbox>
<HighlightBase
{...props}
Expand Down

0 comments on commit 9842d45

Please sign in to comment.