Add dark mode (#199)
* Add passive dark mode to everything but codemirror * Add dark theme support for Codemirror * Make theme a user setting * Fix button text size * guard against undefined window * Formatting and test fix
This commit is contained in:
@ -53,9 +53,6 @@ export const ConvertToVariable = () => {
|
||||
console.log('e', e)
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableAngLen ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableAngLen}
|
||||
>
|
||||
ConvertToVariable
|
||||
|
@ -86,9 +86,6 @@ export const EqualAngle = () => {
|
||||
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
|
||||
})
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableEqual ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableEqual}
|
||||
title="yo dawg"
|
||||
>
|
||||
|
@ -86,9 +86,6 @@ export const EqualLength = () => {
|
||||
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
|
||||
})
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableEqual ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableEqual}
|
||||
title="yo dawg"
|
||||
>
|
||||
|
@ -65,9 +65,6 @@ export const HorzVert = ({
|
||||
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
|
||||
})
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableHorz ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableHorz}
|
||||
title="yo dawg"
|
||||
>
|
||||
|
@ -187,9 +187,6 @@ export const Intersect = () => {
|
||||
})
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enable ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enable}
|
||||
>
|
||||
perpendicularDistance
|
||||
|
@ -69,9 +69,6 @@ export const RemoveConstrainingValues = () => {
|
||||
callBack: updateCursors(setCursor, selectionRanges, pathToNodeMap),
|
||||
})
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableHorz ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableHorz}
|
||||
title="yo dawg"
|
||||
>
|
||||
|
@ -131,9 +131,6 @@ export const SetAbsDistance = ({
|
||||
console.log('e', e)
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableAngLen ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableAngLen}
|
||||
>
|
||||
{buttonType}
|
||||
|
@ -146,9 +146,6 @@ export const SetAngleBetween = () => {
|
||||
})
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enable ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enable}
|
||||
>
|
||||
angleBetween
|
||||
|
@ -168,9 +168,6 @@ export const SetHorzVertDistance = ({
|
||||
})
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enable ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enable}
|
||||
>
|
||||
{buttonType}
|
||||
|
@ -143,9 +143,6 @@ export const SetAngleLength = ({
|
||||
console.log('e', e)
|
||||
}
|
||||
}}
|
||||
className={`border m-1 px-1 rounded text-xs ${
|
||||
enableAngLen ? 'bg-gray-50 text-gray-800' : 'bg-gray-200 text-gray-400'
|
||||
}`}
|
||||
disabled={!enableAngLen}
|
||||
>
|
||||
{angleOrLength}
|
||||
|
Reference in New Issue
Block a user