Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Axis color property doesn't accept THREE.Color? #203

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
39 changes: 39 additions & 0 deletions src/stories/Axis.stories.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import React from "react"
import * as THREE from "three"
import { Story, Meta } from "@storybook/react"

import { CustomMathbox as Mathbox } from "./utils"
import { Axis, Cartesian } from "../components/components"

export default {
title: "Axis",
component: Axis,
argTypes: {
range: {
type: "array",
default: [
[-1, 1],
[-1, 1],
[-1, 1],
[-1, 1],
],
},
scale: {
type: "array",
default: [1, 1, 1],
},
},
} as Meta<typeof Axis>

const Template: Story<React.ComponentProps<typeof Axis>> = (args) => (
<Mathbox containerStyle={{ height: 450 }}>
<Cartesian {...args}>
<Axis color={new THREE.Color(0xff4136)} />
<Axis axis={2} color={new THREE.Color(0x2ecc40)} />
<Axis axis={3} color={new THREE.Color(0x0074d9)} />
</Cartesian>
</Mathbox>
)

export const AxisDoesntRenderColors = Template.bind({})
AxisDoesntRenderColors.args = {}