Skip to content

How to import parseColor? #586

@LiamKarlMitchell

Description

@LiamKarlMitchell

Describe the bug
parseColor should be in the color utils but I can't see how to import this.
Trying to use color wheel
https://kobalte.dev/docs/core/components/color-wheel

See a typescript error.

Module '"node_modules/@kobalte/core/dist/index.d"' has no exported member 'parseColor'.ts(2305)

To Reproduce

  1. Go to https://kobalte.dev/docs/core/components/color-wheel
  2. Scroll down to Usage, Default value
  3. Try to add this to your project.
import { ColorWheel } from "@kobalte/core/color-wheel";
import { parseColor } from "@kobalte/core";
function App() {
	return (
		<ColorWheel defaultValue={parseColor("hsl(80, 100%, 50%)")}>
			<ColorWheel.Label>Label</ColorWheel.Label>
			<ColorWheel.Track>
				<ColorWheel.Thumb>
					<ColorWheel.Input />
				</ColorWheel.Thumb>
			</ColorWheel.Track>
		</ColorWheel>
	);
}

Expected behavior
Should work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions