UNPKG

@instructure/quiz-interactions

Version:

A React UI component Library for quiz interaction types.

40 lines (35 loc) 1.16 kB
const generateStyle = (componentTheme, props) => { return { blankScreenReaderContentWrapper: { display: 'inline-block', }, '[contenteditable=true]:empty::before': { content: 'attr(placeholder)', color: componentTheme.tableColor, cursor: 'text', }, editableText: { color: componentTheme.editStemColor, display: 'inline-block', fontFamily: componentTheme.editStemFontFamily, fontSize: componentTheme.editStemFontSize, fontWeight: componentTheme.editStemFontWeight, lineHeight: componentTheme.editStemLineHeight, whiteSpace: 'pre-wrap', '&:focus': { outline: '0 none', }, ...(props.stemItems.length <= 1 && {width: '100%'}), }, highlight: { border: `${componentTheme.highlightBorder} solid ${componentTheme.highlightColor}`, borderRadius: componentTheme.highlightBorderRadius, padding: componentTheme.highlightPadding, position: 'relative', marginLeft: componentTheme.highlightMargin, marginRight: componentTheme.highlightMargin, wordWrap: 'break-word', }, } } export default generateStyle