playbook_ui 14.11.0.pre.rc.0 → 14.11.0.pre.rc.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 93788c4b8bbd44e019a38f5571acf4198049ac438dc27c167cefd7cab650b87b
4
- data.tar.gz: 63d3895e773f530e299617c20b4a8f6d079b2459138601e2f5692263a0726a70
3
+ metadata.gz: f7485c2964f0df7dc702e1fd9895ad2a789c9762eca2242fc2a4286d70e53939
4
+ data.tar.gz: 42e1c868c9a1d45c49227ba8c4ec19b5dbcf5c402a9173b0f5f8bc10a327a65b
5
5
  SHA512:
6
- metadata.gz: df77853746ada203efa406ee169fe74991875b8ef9fb51d8fddf318560fb4d7aaea92b6ec037490c998143c9b4ba63651c88b8f7f55b2e6780a79da5e3f647cd
7
- data.tar.gz: 26777aace2401665ed06140676e6b00afb55d8e3a69f63400a74edd01c85d1bdbf883b48e90a464bbf67cc93f988f5eecfd2377b7eee4847d9ed0bb667c0cdf3
6
+ metadata.gz: f9ae09094c9913b5b9252520dde467243225d106e0bc72ba6c0b089244c326497b0d5dc85ab24012258b52a79ff80413778094610583181c36057f68fd6b1363
7
+ data.tar.gz: 7672ee2433fddd32528fedeb274285b8da1276aad6e442b092d238924fe44880d7110dfdf59302b73e29434d44a36476d6d92142001682cab96333b77f92e8ca
@@ -20,6 +20,7 @@ type CircleIconButtonProps = {
20
20
  onClick?: React.MouseEventHandler<HTMLElement>,
21
21
  newWindow?: boolean,
22
22
  type?: 'button' | 'submit' | 'reset' | undefined,
23
+ target?: string
23
24
  variant?: 'primary' | 'secondary' | 'link',
24
25
  }
25
26
 
@@ -36,6 +37,7 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
36
37
  loading = false,
37
38
  onClick = noop,
38
39
  type,
40
+ target,
39
41
  link,
40
42
  newWindow,
41
43
  variant,
@@ -66,6 +68,7 @@ const CircleIconButton = (props: CircleIconButtonProps): React.ReactElement => {
66
68
  loading={loading}
67
69
  newWindow={newWindow}
68
70
  onClick={onClick}
71
+ target={target}
69
72
  text={null}
70
73
  variant={variant}
71
74
  >
@@ -1,5 +1,5 @@
1
1
  <%= pb_content_tag do %>
2
- <%= pb_rails("button", props: {type: object.type, loading: object.loading, link: object.link, new_window:object.new_window, variant: object.variant, disabled: object.disabled, dark: object.dark}) do %>
2
+ <%= pb_rails("button", props: {type: object.type, loading: object.loading, link: object.link, new_window:object.new_window, variant: object.variant, target: object.target, disabled: object.disabled, dark: object.dark}) do %>
3
3
  <%= pb_rails("icon", props: {icon: object.icon, fixed_width: true, dark: object.dark}) %>
4
4
  <% end %>
5
5
  <% end %>
@@ -17,6 +17,7 @@ module Playbook
17
17
  prop :link
18
18
  prop :new_window, type: Playbook::Props::Boolean,
19
19
  default: false
20
+ prop :target
20
21
  def classname
21
22
  generate_classname("pb_circle_icon_button_kit")
22
23
  end
@@ -10,3 +10,11 @@
10
10
  link: "https://google.com",
11
11
  new_window: true
12
12
  }) %>
13
+ <br/>
14
+ <%= pb_rails("circle_icon_button", props: {
15
+ icon: "info",
16
+ variant: "secondary",
17
+ aria: { label: "Link to Playbook in new window" },
18
+ link: "https://playbook.powerapp.cloud/",
19
+ target: "child"
20
+ }) %>
@@ -21,6 +21,15 @@ const CircleIconButtonLink = (props) => (
21
21
  {...props}
22
22
  />
23
23
 
24
+ <br/>
25
+
26
+ <CircleIconButton
27
+ aria={{ label: "Link to Playbook in new window" }}
28
+ icon="info"
29
+ link="https://playbook.powerapp.cloud/"
30
+ target="child"
31
+ variant="secondary"
32
+ />
24
33
  </div>
25
34
  )
26
35
 
@@ -0,0 +1 @@
1
+ The `link` prop accepts a string that is used as an href value and causes the button to act as a link. The default behavior of a link is to open in the current window. You can optionally alter the link behavior by adding the `newWindow` prop (boolean), which will open the link in a new window, or by calling the `target` prop, which accepts `_self`, `_blank`, `_parent`, `_top`, `child`, or any string, allowing you to specify any link target.