Skip to content

Commit

Permalink
Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ImJeremyHe committed Jan 31, 2025
1 parent 2af9893 commit 6d632bc
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 11 deletions.
16 changes: 8 additions & 8 deletions src/components/top-bar/content/border-setting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ export const BorderSettingComponent = ({
border:
selectedRange === 'outer' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
}}
/>
Expand All @@ -226,12 +226,12 @@ export const BorderSettingComponent = ({
borderTop:
selectedRange === 'top' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
borderRight:
selectedRange === 'right' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
}}
/>
Expand All @@ -242,18 +242,18 @@ export const BorderSettingComponent = ({
borderBottom:
selectedRange === 'bottom' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
borderTop:
selectedRange === 'inner' ||
selectedRange === 'all' ||
selectedRange === 'horizontal'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
borderRight:
selectedRange === 'right' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
}}
/>
Expand All @@ -264,13 +264,13 @@ export const BorderSettingComponent = ({
borderLeft:
selectedRange === 'left' ||
selectedRange === 'all'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
borderRight:
selectedRange === 'inner' ||
selectedRange === 'all' ||
selectedRange === 'vertical'
? `${previewLineWidth}px ${borderStyle} ${color}`
? `${previewLineWidth}px ${borderStyle} ${color.css()}`
: 'none',
}}
/>
Expand Down
10 changes: 8 additions & 2 deletions src/components/top-bar/content/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export const StartComponent = ({selectedData}: StartProps) => {
const cellInfo = DATA_SERVICE.getCellInfo(sheet, row, col)
cellInfo.then((c) => {
if (isErrorMessage(c)) return
console.log('cell info', c)
const style = c.getStyle()
const alignment = style.alignment
if (alignment) {
Expand Down Expand Up @@ -474,7 +473,14 @@ export const StartComponent = ({selectedData}: StartProps) => {
shouldCloseOnOverlayClick={true}
className={styles['modal-content']}
overlayClassName={styles['modal-overlay']}
style={{content: {top: '100px', left: '0px'}}}
onRequestClose={() => setBorderSettingOn(false)}
style={{
content: {
top: '50%',
left: '50%',
transform: 'translate(-50%, -50%)',
},
}}
ariaHideApp={false}
>
<BorderSettingComponent
Expand Down
3 changes: 2 additions & 1 deletion src/components/top-bar/content/preview-line.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ export const borderStyleNames = [
// 'slantDashDot',
'thick',
'thin',
'none',
]

export const PreviewLineComponent = ({style}: PreviewLineProps) => {
if (style === 'none') return <></>
if (style === 'none') return <div>(None)</div>

return (
<svg width="100%" height="10" xmlns="http://www.w3.org/2000/svg">
Expand Down

0 comments on commit 6d632bc

Please sign in to comment.