Files
huly-platform/plugins/contact-resources/src/utils.ts
T
2022-01-11 10:05:53 +01:00

11 lines
367 B
TypeScript

import { Class, Doc, Ref } from '@anticrm/core'
import { getPlatformColorForText } from '@anticrm/ui'
export function getMixinStyle (id: Ref<Class<Doc>>, selected: boolean): string {
const color = getPlatformColorForText(id as string)
return `
background: ${color + (selected ? 'ff' : '33')};
border: 1px solid ${color + (selected ? '0f' : '66')};
`
}