Skip to content

Commit

Permalink
[field] Update SlugPreview
Browse files Browse the repository at this point in the history
  • Loading branch information
mariuslundgard authored and rexxars committed Oct 6, 2020
1 parent da00126 commit 3267844
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
@import 'part:@sanity/base/theme/variables-style';

.root {
display: block;
display: inline-block;
padding: var(--extra-small-padding) var(--small-padding);
border-radius: var(--border-radius-small);
word-break: break-all;

@nest del & {
text-decoration: line-through;
Expand Down
8 changes: 2 additions & 6 deletions packages/@sanity/field/src/types/slug/preview/SlugPreview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,7 @@ import {Slug} from '../types'
import styles from './SlugPreview.css'

export const SlugPreview: PreviewComponent<Slug> = props => {
const {color, value} = props
const {value} = props

return (
<span className={styles.root} style={{background: color?.background, color: color?.text}}>
{value.current}
</span>
)
return <span className={styles.root}>{value.current}</span>
}

0 comments on commit 3267844

Please sign in to comment.