@performant-software/semantic-components 1.0.21 → 1.0.22-beta.0

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@performant-software/semantic-components",
3
- "version": "1.0.21",
3
+ "version": "1.0.22-beta.0",
4
4
  "description": "A package of shared components based on the Semantic UI Framework.",
5
5
  "license": "MIT",
6
6
  "main": "./build/index.js",
@@ -12,7 +12,7 @@
12
12
  "build": "webpack --mode production && flow-copy-source -v src types"
13
13
  },
14
14
  "dependencies": {
15
- "@performant-software/shared-components": "^1.0.21",
15
+ "@performant-software/shared-components": "^1.0.22-beta.0",
16
16
  "@react-google-maps/api": "^2.8.1",
17
17
  "axios": "^0.26.1",
18
18
  "i18next": "^19.4.4",
@@ -13,10 +13,12 @@ type Sort = {
13
13
  };
14
14
 
15
15
  type Props = {
16
+ basic?: boolean,
16
17
  defaultView?: number,
17
18
  hideToggle?: boolean,
18
19
  onSort?: (sortColumn: string, sortDirection?: ?string) => void,
19
20
  sort?: Array<Sort>,
21
+ sortColor?: string,
20
22
  sortColumn?: string,
21
23
  sortDirection?: string
22
24
  };
@@ -41,6 +43,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
41
43
  class extends Component<Props, State> {
42
44
  // Default props
43
45
  static defaultProps = {
46
+ basic: true,
44
47
  hideToggle: false,
45
48
  sort: []
46
49
  };
@@ -141,14 +144,14 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
141
144
  <Button
142
145
  active={this.state.view === Views.list}
143
146
  aria-label='List View'
144
- basic
147
+ basic={this.props.basic}
145
148
  icon='list'
146
149
  onClick={() => this.setState({ view: Views.list })}
147
150
  />
148
151
  <Button
149
152
  active={this.state.view === Views.grid}
150
153
  aria-label='Grid View'
151
- basic
154
+ basic={this.props.basic}
152
155
  icon='grid layout'
153
156
  onClick={() => this.setState({ view: Views.grid })}
154
157
  />
@@ -156,7 +159,8 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
156
159
  )}
157
160
  { !_.isEmpty(this.props.sort) && this.props.onSort && (
158
161
  <Button.Group
159
- basic
162
+ basic={this.props.basic}
163
+ color={this.props.sortColor}
160
164
  style={{
161
165
  fontSize: 'inherit'
162
166
  }}
@@ -13,10 +13,12 @@ type Sort = {
13
13
  };
14
14
 
15
15
  type Props = {
16
+ basic?: boolean,
16
17
  defaultView?: number,
17
18
  hideToggle?: boolean,
18
19
  onSort?: (sortColumn: string, sortDirection?: ?string) => void,
19
20
  sort?: Array<Sort>,
21
+ sortColor?: string,
20
22
  sortColumn?: string,
21
23
  sortDirection?: string
22
24
  };
@@ -41,6 +43,7 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
41
43
  class extends Component<Props, State> {
42
44
  // Default props
43
45
  static defaultProps = {
46
+ basic: true,
44
47
  hideToggle: false,
45
48
  sort: []
46
49
  };
@@ -141,14 +144,14 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
141
144
  <Button
142
145
  active={this.state.view === Views.list}
143
146
  aria-label='List View'
144
- basic
147
+ basic={this.props.basic}
145
148
  icon='list'
146
149
  onClick={() => this.setState({ view: Views.list })}
147
150
  />
148
151
  <Button
149
152
  active={this.state.view === Views.grid}
150
153
  aria-label='Grid View'
151
- basic
154
+ basic={this.props.basic}
152
155
  icon='grid layout'
153
156
  onClick={() => this.setState({ view: Views.grid })}
154
157
  />
@@ -156,7 +159,8 @@ const useItemsToggle = (WrappedComponent: ComponentType<any>) => (
156
159
  )}
157
160
  { !_.isEmpty(this.props.sort) && this.props.onSort && (
158
161
  <Button.Group
159
- basic
162
+ basic={this.props.basic}
163
+ color={this.props.sortColor}
160
164
  style={{
161
165
  fontSize: 'inherit'
162
166
  }}