Skip to content

Commit

Permalink
feat: use different pointers parts
Browse files Browse the repository at this point in the history
  • Loading branch information
web-padawan committed Sep 1, 2020
1 parent ab2884d commit 2aa7954
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
3 changes: 2 additions & 1 deletion src/color-picker-hex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const colorModel: ColorModel<string> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerHex extends ColorPicker<string> {
protected get colorModel(): ColorModel<string> {
Expand Down
3 changes: 2 additions & 1 deletion src/color-picker-hsl-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const colorModel: ColorModel<string> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerHslString extends ColorPicker<string> {
protected get colorModel(): ColorModel<string> {
Expand Down
3 changes: 2 additions & 1 deletion src/color-picker-hsl.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const colorModel: ColorModel<HSL> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerHsl extends ColorPicker<HSL> {
protected get colorModel(): ColorModel<HSL> {
Expand Down
3 changes: 2 additions & 1 deletion src/color-picker-hsv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ const colorModel: ColorModel<HSV> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerHsv extends ColorPicker<HSV> {
protected get colorModel(): ColorModel<HSV> {
Expand Down
3 changes: 2 additions & 1 deletion src/color-picker-rgb-string.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ const colorModel: ColorModel<string> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerRgbString extends ColorPicker<string> {
protected get colorModel(): ColorModel<string> {
Expand Down
3 changes: 2 additions & 1 deletion src/color-picker-rgb.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ const colorModel: ColorModel<RGB> = {
*
* @csspart hue - A hue selector container.
* @csspart saturation - A saturation selector container
* @csspart pointer - A draggable pointer element.
* @csspart hue-pointer - A hue pointer element.
* @csspart saturation-pointer - A saturation pointer element.
*/
export class ColorPickerRgb extends ColorPicker<RGB> {
protected get colorModel(): ColorModel<RGB> {
Expand Down
4 changes: 2 additions & 2 deletions src/lib/components/color-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import styles from '../styles/color-picker.js';

const tpl = createTemplate(`
<style>${styles}</style>
<color-saturation part="saturation" exportparts="pointer"></color-saturation>
<color-hue part="hue" exportparts="pointer"></color-hue>
<color-saturation part="saturation" exportparts="pointer: saturation-pointer"></color-saturation>
<color-hue part="hue" exportparts="pointer: hue-pointer"></color-hue>
`);

const $color = Symbol('color');
Expand Down

0 comments on commit 2aa7954

Please sign in to comment.