From f19593905b847d02c07886d89f8d0342e6229bc4 Mon Sep 17 00:00:00 2001 From: Chris Williams Date: Wed, 13 May 2020 13:42:22 -0700 Subject: [PATCH] docs(vx-curve): update to docgen --- .../vx-demo/src/components/PackageList.tsx | 2 +- packages/vx-demo/src/pages/docs/Curve.tsx | 5 + .../vx-demo/src/static/docs/vx-curve.html | 140 ------------------ 3 files changed, 6 insertions(+), 141 deletions(-) create mode 100644 packages/vx-demo/src/pages/docs/Curve.tsx delete mode 100644 packages/vx-demo/src/static/docs/vx-curve.html diff --git a/packages/vx-demo/src/components/PackageList.tsx b/packages/vx-demo/src/components/PackageList.tsx index 714dca359..69169a203 100644 --- a/packages/vx-demo/src/components/PackageList.tsx +++ b/packages/vx-demo/src/components/PackageList.tsx @@ -27,7 +27,7 @@ export default function PackageList({ {!compact &&

Annotate your coordinate system

}
  • - @vx/curve + @vx/curve {!compact &&

    d3 line interpolators for @vx/shape

    }
  • diff --git a/packages/vx-demo/src/pages/docs/Curve.tsx b/packages/vx-demo/src/pages/docs/Curve.tsx new file mode 100644 index 000000000..b74804cad --- /dev/null +++ b/packages/vx-demo/src/pages/docs/Curve.tsx @@ -0,0 +1,5 @@ +import React from 'react'; +import CurveReadme from '!!raw-loader!../../../../vx-curve/Readme.md'; +import DocPage from '../../components/DocPage'; + +export default () => ; diff --git a/packages/vx-demo/src/static/docs/vx-curve.html b/packages/vx-demo/src/static/docs/vx-curve.html deleted file mode 100644 index c195e90a8..000000000 --- a/packages/vx-demo/src/static/docs/vx-curve.html +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - -
    - -
    -

    @vx/curve

    -
    npm install --save @vx/curve
    -

    Overview

    -

    A curve is a function that can be passed into other vx objects, mainly a LinePath to change the way the line is structured.

    -

    For example, checkout the difference between a Curve.natural:

    -

    natural curve

    -

    and a Curve.step:

    -

    step curve

    -

    The @vx/curve package is a wrapper over d3-shape curve functions.

    -

    Any function with the prefix curve in d3 can be used through vx like so:

    -
    import { curveCatmullRomOpen } from '@vx/curve';
    -let line = (<Shape.LinePath curve={curveCatmullRomOpen} />)
    -
    -// or if you want namespace all Curves under the `Curve`
    -import * as Curve from `@vx/curve`;
    -let line = (<Shape.LinePath curve={Curve.curveCatmullRomOpen} />)
    -
    -

    Functions

    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    vxd3
    curveBasiscurveBasis
    curveBasisClosecurveBasisClosed
    curveBasisOpencurveBasisOpen
    curveStepcurveStep
    curveStepAftercurveStepAfter
    curveStepBeforecurveStepbefore
    curveBundlecurveBundle
    curveLinearcurveLinear
    curveLinearClosedcurveLinearClosed
    curveMonotoneXcurveMonotoneX
    curveMonotoneYcurveMonotoneY
    curveCardinalcurveCardinal
    curveCardinalClosedcurveCardinalClosed
    curveCardinalOpencurveCardinalOpen
    curveCatmullRomcurveCatmullRom
    curveCatmullRomClosedcurveCatmullRomClosed
    curveCatmullRomOpencurveCatmullRomOpen
    curveNaturalcurveNatural
    - -
    -
    - - \ No newline at end of file