From 4aa1bf504d99d28f5d76a79c3ff8c73597b04ef4 Mon Sep 17 00:00:00 2001 From: Pavel Sharanda Date: Tue, 11 Jun 2024 22:50:20 +0100 Subject: [PATCH] Update README.md --- .../Stories/FixFlexStories.swift | 4 +- README.md | 43 ++++++++----------- Readme/src/templates/README.md | 3 +- 3 files changed, 20 insertions(+), 30 deletions(-) diff --git a/FixFlexSamples/FixFlexSamples/Stories/FixFlexStories.swift b/FixFlexSamples/FixFlexSamples/Stories/FixFlexStories.swift index 8d4c977..b3729b9 100644 --- a/FixFlexSamples/FixFlexSamples/Stories/FixFlexStories.swift +++ b/FixFlexSamples/FixFlexSamples/Stories/FixFlexStories.swift @@ -19,11 +19,11 @@ class FixFlexStories: DynamicComponentStories { parent.widthAnchor.constraint(equalToConstant: 200).isActive = true parent.heightAnchor.constraint(equalToConstant: 100).isActive = true + // demo parent.fx.hstack(Fix(15), Flex(child), Fix(15)) - // demo - + parent.fx.vstack(Fix(15), Flex(child), Fix(15)) diff --git a/README.md b/README.md index ea250de..2eaba03 100644 --- a/README.md +++ b/README.md @@ -213,10 +213,13 @@ Huh, that's a lot of code to write, and imagine needing to modify it — inserti + width="200"/> ```swift +parent.fx.hstack(Fix(15), + Flex(child), + Fix(15)) + parent.fx.vstack(Fix(15), Flex(child), Fix(15)) @@ -228,8 +231,7 @@ parent.fx.vstack(Fix(15), + width="200"/> ```swift parent.fx.hstack(Flex(), @@ -247,8 +249,7 @@ parent.fx.vstack(Flex(), + width="200"/> ```swift parent.fx.hstack(Fill(), @@ -266,8 +267,7 @@ parent.fx.vstack(Fill(), + width="200"/> ```swift parent.fx.hstack(Fill(), @@ -285,8 +285,7 @@ parent.fx.vstack(Fill(), + width="200"/> ```swift parent.fx.hstack(Flex([topLabel, bottomLabel])) @@ -304,8 +303,7 @@ parent.fx.vstack(Fill(), + width="200"/> ```swift parent.fx.hstack(Fix(15), @@ -336,8 +334,7 @@ parent.fx.vstack(Fill(), + width="200"/> ```swift parent.fx.hstack(Fix(5), @@ -358,8 +355,7 @@ parent.fx.vstack(Fix(5), + width="200"/> ```swift parent.fx.vstack(Flex([leftLabel, rightLabel])) @@ -375,8 +371,7 @@ parent.fx.hstack(Flex(leftLabel, compressionResistancePriority: .required), + width="200"/> ```swift parent.fx.vstack(Fix(5), @@ -398,8 +393,7 @@ parent.fx.hstack(Fix(5), + width="200"/> ```swift parent.fx.vstack(Fix(5), @@ -430,8 +424,7 @@ parent.fx.hstack(Fix(5), + width="200"/> ```swift parent.fx.vstack(Flex([label, leadingView, trailingView])) @@ -453,8 +446,7 @@ parent.fx.hstack(startAnchor: label.leadingAnchor, + width="200"/> ```swift parent.fx.vstack(Flex([label, leadingView, trailingView])) @@ -477,8 +469,7 @@ parent.fx.hstack(startAnchor: label.leftAnchor, + width="200"/> ```swift parent.fx.vstack(Fill(), diff --git a/Readme/src/templates/README.md b/Readme/src/templates/README.md index 94bc471..c7b4ac0 100644 --- a/Readme/src/templates/README.md +++ b/Readme/src/templates/README.md @@ -213,8 +213,7 @@ Huh, that's a lot of code to write, and imagine needing to modify it — inserti + width="<%- `${story.imageWidth/3}` %>"/> ```swift <%- story.codeSnippet %>