Skip to content

Commit

Permalink
feat: Add flex-wrap styles
Browse files Browse the repository at this point in the history
  • Loading branch information
Brandon Dow committed Dec 6, 2023
1 parent 022d83c commit 642f351
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"prettier": "^2.7.1",
"semantic-release": "^19.0.5",
"ts-node": "^10.9.1",
"ttypescript": "^1.5.13",
"ttypescript": "^1.5.15",
"typescript": "^4.8.4",
"typescript-transform-paths": "^3.4.4"
},
Expand Down
16 changes: 16 additions & 0 deletions packages/template-tachyons/src/Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,22 @@ class CssBuilder<T extends Properties> {
fd(value: Properties["flexDirection"]) {
return this.add("flexDirection", value);
}
/** Sets `flexWrap: "wrap"`. */
get fww() {
return this.add("flexWrap", "wrap");
}
/** Sets `flexWrap: "wrap-reverse"`. */
get fwr() {
return this.add("flexWrap", "wrap-reverse");
}
/** Sets `flexWrap: "nowrap"`. */
get fwnw() {
return this.add("flexWrap", "nowrap");
}
/** Sets `flexWrap: value`. */
flexWrap(value: Properties["flexWrap"]) {
return this.add("flexWrap", value);
}

// float
/** Sets `float: "left"`. */
Expand Down
16 changes: 16 additions & 0 deletions packages/testing-tachyons/src/Css.ts
Original file line number Diff line number Diff line change
Expand Up @@ -733,6 +733,22 @@ class CssBuilder<T extends Properties> {
fd(value: Properties["flexDirection"]) {
return this.add("flexDirection", value);
}
/** Sets `flexWrap: "wrap"`. */
get fww() {
return this.add("flexWrap", "wrap");
}
/** Sets `flexWrap: "wrap-reverse"`. */
get fwr() {
return this.add("flexWrap", "wrap-reverse");
}
/** Sets `flexWrap: "nowrap"`. */
get fwnw() {
return this.add("flexWrap", "nowrap");
}
/** Sets `flexWrap: value`. */
flexWrap(value: Properties["flexWrap"]) {
return this.add("flexWrap", value);
}

// float
/** Sets `float: "left"`. */
Expand Down
10 changes: 10 additions & 0 deletions packages/truss/src/sections/tachyons/flexbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,4 +161,14 @@ export const flexbox: CreateMethodsFn = () => [
},
"fd",
),

...newMethodsForProp(
"flexWrap",
{
fww: "wrap",
fwr: "wrap-reverse",
fwnw: "nowrap",
},
"flexWrap",
),
];
10 changes: 5 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9370,7 +9370,7 @@ __metadata:
prettier: ^2.7.1
semantic-release: ^19.0.5
ts-node: ^10.9.1
ttypescript: ^1.5.13
ttypescript: ^1.5.15
typescript: ^4.8.4
typescript-transform-paths: ^3.4.4
languageName: unknown
Expand Down Expand Up @@ -9463,9 +9463,9 @@ __metadata:
languageName: node
linkType: hard

"ttypescript@npm:^1.5.13":
version: 1.5.13
resolution: "ttypescript@npm:1.5.13"
"ttypescript@npm:^1.5.15":
version: 1.5.15
resolution: "ttypescript@npm:1.5.15"
dependencies:
resolve: ">=1.9.0"
peerDependencies:
Expand All @@ -9474,7 +9474,7 @@ __metadata:
bin:
ttsc: bin/tsc
ttsserver: bin/tsserver
checksum: bd97f058520ebd6183446b2100bfc714c400455e2195c3711d00c3407521d99098a4a204f16200c14a115cd78a5005d4a790bf7fb73a1b21a513573291a9c1d0
checksum: 0328578050f08f9d12e6732a9fe71e93cc693ed5e825aefb7f4ba142d4d3d6912caa59a723f775de89cd066c8e609665fd5a7ccfa3b69fb3456c7f24d695db90
languageName: node
linkType: hard

Expand Down

0 comments on commit 642f351

Please sign in to comment.