@jsenv/navi 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21605,7 +21605,7 @@ const ButtonBasic = forwardRef((props, ref) => {
21605
21605
  marginRight: "auto"
21606
21606
  } : {
21607
21607
  alignSelf: "end",
21608
- marginRight: "auto"
21608
+ marginLeft: "auto"
21609
21609
  })
21610
21610
  }, style);
21611
21611
  return jsx("button", {
@@ -28053,6 +28053,7 @@ const Text = ({
28053
28053
  italic,
28054
28054
  underline,
28055
28055
  style,
28056
+ alignX,
28056
28057
  ...rest
28057
28058
  }) => {
28058
28059
  const innerStyle = withPropsStyle({
@@ -28060,7 +28061,15 @@ const Text = ({
28060
28061
  fontWeight: bold ? "bold" : undefined,
28061
28062
  fontStyle: italic ? "italic" : undefined,
28062
28063
  textDecoration: underline ? "underline" : undefined,
28063
- ...consumeSpacingProps(rest)
28064
+ ...consumeSpacingProps(rest),
28065
+ ...(alignX === "start" ? {} : alignX === "center" ? {
28066
+ alignSelf: "center",
28067
+ marginLeft: "auto",
28068
+ marginRight: "auto"
28069
+ } : {
28070
+ alignSelf: "end",
28071
+ marginLeft: "auto"
28072
+ })
28064
28073
  }, style);
28065
28074
  return jsx("span", {
28066
28075
  ...rest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/navi",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "description": "Library of components including navigation to create frontend applications",
5
5
  "repository": {
6
6
  "type": "git",
@@ -253,7 +253,7 @@ const ButtonBasic = forwardRef((props, ref) => {
253
253
  }
254
254
  : {
255
255
  alignSelf: "end",
256
- marginRight: "auto",
256
+ marginLeft: "auto",
257
257
  }),
258
258
  },
259
259
  style,
@@ -31,6 +31,7 @@ export const Text = ({
31
31
  italic,
32
32
  underline,
33
33
  style,
34
+ alignX,
34
35
  ...rest
35
36
  }) => {
36
37
  const innerStyle = withPropsStyle(
@@ -40,6 +41,18 @@ export const Text = ({
40
41
  fontStyle: italic ? "italic" : undefined,
41
42
  textDecoration: underline ? "underline" : undefined,
42
43
  ...consumeSpacingProps(rest),
44
+ ...(alignX === "start"
45
+ ? {}
46
+ : alignX === "center"
47
+ ? {
48
+ alignSelf: "center",
49
+ marginLeft: "auto",
50
+ marginRight: "auto",
51
+ }
52
+ : {
53
+ alignSelf: "end",
54
+ marginLeft: "auto",
55
+ }),
43
56
  },
44
57
  style,
45
58
  );