mirror of
https://github.com/mattermost/focalboard.git
synced 2025-02-07 19:30:18 +02:00
Migrating some icons to Compass icons
This commit is contained in:
parent
967e6e8078
commit
c004c7c86d
@ -54,7 +54,7 @@
|
|||||||
},
|
},
|
||||||
"globals": {
|
"globals": {
|
||||||
"ts-jest": {
|
"ts-jest": {
|
||||||
"tsConfig": "./src/tsconfig.json"
|
"tsconfig": "./src/tsconfig.json"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"transform": {
|
"transform": {
|
||||||
|
@ -108,7 +108,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.OptionsIcon,
|
.OptionsIcon {
|
||||||
|
color: rgba(var(--sidebar-fg), 0.5);
|
||||||
|
}
|
||||||
.DisclosureTriangleIcon,
|
.DisclosureTriangleIcon,
|
||||||
.DotIcon {
|
.DotIcon {
|
||||||
fill: rgba(var(--sidebar-fg), 0.5);
|
fill: rgba(var(--sidebar-fg), 0.5);
|
||||||
@ -116,7 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.Menu .OptionsIcon {
|
.Menu .OptionsIcon {
|
||||||
fill: unset;
|
color: unset;
|
||||||
}
|
}
|
||||||
|
|
||||||
.HideSidebarIcon {
|
.HideSidebarIcon {
|
||||||
|
@ -485,44 +485,17 @@ exports[`components/table/Table should match snapshot with GroupBy 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -95,44 +95,17 @@ exports[`should match snapshot with Group 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -186,44 +159,17 @@ exports[`should match snapshot, add new 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -277,44 +223,17 @@ exports[`should match snapshot, edit title 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -368,44 +287,17 @@ exports[`should match snapshot, hide group 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -455,44 +347,17 @@ exports[`should match snapshot, no groups 1`] = `
|
|||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="OptionsIcon Icon"
|
class="CompassIcon icon-dots-horizontal OptionsIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx="30"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="50"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx="70"
|
|
||||||
cy="50"
|
|
||||||
r="5"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="Button IconButton"
|
class="Button IconButton"
|
||||||
>
|
>
|
||||||
<svg
|
<i
|
||||||
class="AddIcon Icon"
|
class="CompassIcon icon-plus AddIcon"
|
||||||
viewBox="0 0 100 100"
|
/>
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points="30,50 70,50"
|
|
||||||
/>
|
|
||||||
<polyline
|
|
||||||
points="50,30 50,70"
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -189,7 +189,7 @@ test('should match snapshot, add new', async () => {
|
|||||||
|
|
||||||
const {container} = render(component)
|
const {container} = render(component)
|
||||||
|
|
||||||
const triangle = container.querySelector('svg.AddIcon')
|
const triangle = container.querySelector('i.AddIcon')
|
||||||
expect(triangle).not.toBeNull()
|
expect(triangle).not.toBeNull()
|
||||||
|
|
||||||
act(() => {
|
act(() => {
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
background-color: rgba(var(--button-bg), 0.8);
|
background-color: rgba(var(--button-bg), 0.8);
|
||||||
}
|
}
|
||||||
.DropdownIcon {
|
.DropdownIcon {
|
||||||
stroke: rgb(var(--button-fg));
|
color: rgb(var(--button-fg));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,9 @@ import CompassIcon from './compassIcon'
|
|||||||
|
|
||||||
export default function LinkIcon(): JSX.Element {
|
export default function LinkIcon(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<CompassIcon icon={'link-variant'}/>
|
<CompassIcon
|
||||||
|
icon='link-variant'
|
||||||
|
className='LinkIcon'
|
||||||
|
/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
.AddIcon {
|
.AddIcon {
|
||||||
stroke: rgb(var(--body-color), 0.5);
|
color: rgb(var(--body-color), 0.5);
|
||||||
stroke-width: 4px;
|
font-size: 16px;
|
||||||
fill: none;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,15 @@
|
|||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import CompassIcon from './compassIcon'
|
||||||
|
|
||||||
import './add.scss'
|
import './add.scss'
|
||||||
|
|
||||||
export default function AddIcon(): JSX.Element {
|
export default function AddIcon(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<svg
|
<CompassIcon
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
icon='plus'
|
||||||
className='AddIcon Icon'
|
className='AddIcon'
|
||||||
viewBox='0 0 100 100'
|
/>
|
||||||
>
|
|
||||||
<polyline points='30,50 70,50'/>
|
|
||||||
<polyline points='50,30 50,70'/>
|
|
||||||
</svg>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
.CloseIcon {
|
.CloseIcon {
|
||||||
stroke: rgb(var(--body-color), 0.5);
|
color: rgb(var(--body-color), 0.5);
|
||||||
stroke-width: 4px;
|
font-size: 24px;
|
||||||
fill: none;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
|
@ -3,17 +3,15 @@
|
|||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import CompassIcon from './compassIcon'
|
||||||
|
|
||||||
import './close.scss'
|
import './close.scss'
|
||||||
|
|
||||||
export default function CloseIcon(): JSX.Element {
|
export default function CloseIcon(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<svg
|
<CompassIcon
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
icon='close'
|
||||||
className='CloseIcon Icon'
|
className='CloseIcon'
|
||||||
viewBox='0 0 100 100'
|
/>
|
||||||
>
|
|
||||||
<polyline points='30,30 70,70'/>
|
|
||||||
<polyline points='70,30 30,70'/>
|
|
||||||
</svg>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -5,12 +5,13 @@ import React from 'react'
|
|||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
icon: string,
|
icon: string,
|
||||||
|
className: string,
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CompassIcon(props: Props): JSX.Element {
|
export default function CompassIcon(props: Props): JSX.Element {
|
||||||
// All compass icon classes start with icon,
|
// All compass icon classes start with icon,
|
||||||
// so not expecting that prefix in props.
|
// so not expecting that prefix in props.
|
||||||
return (
|
return (
|
||||||
<i className={`CompassIcon icon-${props.icon}`}/>
|
<i className={`CompassIcon icon-${props.icon} ${props.className}`}/>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,4 @@
|
|||||||
.DropdownIcon {
|
.DropdownIcon {
|
||||||
fill: none;
|
color: rgb(var(--body-color));
|
||||||
stroke: rgb(var(--body-color));
|
font-size: 16px;
|
||||||
stroke-width: 4px;
|
|
||||||
width: 24px;
|
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
|
@ -3,18 +3,15 @@
|
|||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import CompassIcon from './compassIcon'
|
||||||
|
|
||||||
import './dropdown.scss'
|
import './dropdown.scss'
|
||||||
|
|
||||||
export default function DropdownIcon(): JSX.Element {
|
export default function DropdownIcon(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<svg
|
<CompassIcon
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
icon='chevron-down'
|
||||||
className='DropdownIcon Icon'
|
className='DropdownIcon'
|
||||||
viewBox='0 0 100 100'
|
/>
|
||||||
>
|
|
||||||
<polyline
|
|
||||||
points='30,35 50,55 70,35'
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
.OptionsIcon {
|
.OptionsIcon {
|
||||||
fill: rgba(var(--body-color), 0.5);
|
color: rgba(var(--body-color), 0.5);
|
||||||
width: 24px;
|
font-size: 16px;
|
||||||
height: 24px;
|
|
||||||
}
|
}
|
||||||
|
@ -3,30 +3,15 @@
|
|||||||
|
|
||||||
import React from 'react'
|
import React from 'react'
|
||||||
|
|
||||||
|
import CompassIcon from './compassIcon'
|
||||||
|
|
||||||
import './options.scss'
|
import './options.scss'
|
||||||
|
|
||||||
export default function OptionsIcon(): JSX.Element {
|
export default function OptionsIcon(): JSX.Element {
|
||||||
return (
|
return (
|
||||||
<svg
|
<CompassIcon
|
||||||
xmlns='http://www.w3.org/2000/svg'
|
icon='dots-horizontal'
|
||||||
className='OptionsIcon Icon'
|
className='OptionsIcon'
|
||||||
viewBox='0 0 100 100'
|
/>
|
||||||
>
|
|
||||||
<circle
|
|
||||||
cx='30'
|
|
||||||
cy='50'
|
|
||||||
r='5'
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx='50'
|
|
||||||
cy='50'
|
|
||||||
r='5'
|
|
||||||
/>
|
|
||||||
<circle
|
|
||||||
cx='70'
|
|
||||||
cy='50'
|
|
||||||
r='5'
|
|
||||||
/>
|
|
||||||
</svg>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user