Skip to content

Commit

Permalink
feat(text-canvas): add derived style fns (horizontalOnly, verticalOnly)
Browse files Browse the repository at this point in the history
  • Loading branch information
postspectacular committed Feb 17, 2020
1 parent 0f13fe2 commit dc1cb05
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions packages/text-canvas/src/style.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { StrokeStyle } from "./api";

export const horizontalOnly = ({ hl, dot }: StrokeStyle): StrokeStyle => ({
hl: hl,
vl: " ",
tl: hl,
tr: hl,
bl: hl,
br: hl,
tjl: hl,
tjr: hl,
tjt: hl,
tjb: hl,
jct: hl,
dot
});

export const verticalOnly = ({ vl, dot }: StrokeStyle): StrokeStyle => ({
hl: " ",
vl: vl,
tl: vl,
tr: vl,
bl: vl,
br: vl,
tjl: vl,
tjr: vl,
tjt: vl,
tjb: vl,
jct: vl,
dot
});

0 comments on commit dc1cb05

Please sign in to comment.