${this.inline
? html`
${this.label}
`
: null}
${this.opacity
? html`
`
: ''}
${!this.noFormatToggle
? html`
${this.setLetterCase(this.format)}
`
: ''}
${hasEyeDropper
? html`
`
: ''}
${this.swatches.length > 0
? html`
${this.swatches.map(swatch => {
return html`
!this.disabled && this.setColor(swatch)}
@keydown=${(event: KeyboardEvent) =>
!this.disabled && event.key === 'Enter' && this.setColor(swatch)}
>
`;
})}
`
: ''}
`;
// Render inline
if (this.inline) {
return colorPicker;
}
// Render as a dropdown
return html`