Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: publish-npm
on:
workflow_dispatch:
push:
tags:
- 'v*'
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
Expand All @@ -29,6 +28,9 @@ jobs:
- name: Build project
run: |
npm run build-publish
- name: Sync version from Git Tag
run: |
npm version ${{ github.ref_name }} --no-git-tag-version
- name: Publish to NPM
run: |
echo Publishing to test repo $NODE_AUTH_TOKEN
Expand Down
12 changes: 11 additions & 1 deletion src/components/data-entry/DualRangeSlider/DualRangeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,14 @@ export interface DualRangeSliderProps {
* This can be used to lift the new "nice" domain upwards.
*/
onPropsChange?: (props: any) => void;
/**
* styles for input
*/
styleInput?: object;
/**
* styles for slider
*/
styleSlider?: object;
}

/**
Expand Down Expand Up @@ -343,6 +351,7 @@ export const DualRangeSlider: React.FC<DualRangeSliderProps> = ({
<input
data-testid="lower-bound-input"
className="input is-small"
style={props.styleInput}
type="number"
value={lowerBound}
min={scale.domain()[0]}
Expand All @@ -355,6 +364,7 @@ export const DualRangeSlider: React.FC<DualRangeSliderProps> = ({
<input
data-testid="upper-bound-input"
className="input is-small"
style={props.styleInput}
type="number"
value={upperBound}
min={scale.domain()[0]}
Expand All @@ -364,7 +374,7 @@ export const DualRangeSlider: React.FC<DualRangeSliderProps> = ({
/>
</div>
</div>
<div className="slider">
<div className="slider" style={props.styleSlider}>
<Range
values={values}
step={step}
Expand Down
6 changes: 5 additions & 1 deletion src/components/data-entry/FilterField/FilterField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ interface FilterFieldProps {
*/
active?: boolean;
resetFilter?: (id: any) => any;
/**
* styles for label
*/
styleLabel?: object;
}

/**
Expand Down Expand Up @@ -74,7 +78,7 @@ export const FilterField: React.FC<FilterFieldProps> = ({ dois = [], ...otherPro
return (
<div id={props.id} className={classNames('mpc-filter-field', props.className)}>
{props.label && (
<div className="mpc-filter-label">
<div className="mpc-filter-label" style={props.styleLabel}>
{renderFilterLabel()}
{props.dois.map((doi, i) => (
<PublicationButton key={`${i}-${doi}`} doi={doi} compact className="tag ml-2" />
Expand Down
11 changes: 10 additions & 1 deletion src/components/data-entry/RangeSlider/RangeSlider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,14 @@ export interface RangeSliderProps {
* Function to call when slider values change.
*/
onChange?: (values: number[]) => void;
/**
* styles for input
*/
styleInput?: object;
/**
* styles for slider
*/
styleSlider?: object;
}

/**
Expand Down Expand Up @@ -258,14 +266,15 @@ export const RangeSlider: React.FC<RangeSliderProps> = ({
<input
data-testid="lower-bound-input"
className="input is-small"
style={props.styleInput}
type="number"
value={inputValue}
min={scale.domain()[0]}
max={scale.domain()[1]}
step={props.step}
onChange={handleInputChange}
/>
<div className="slider">
<div className="slider" style={props.styleSlider}>
<Range
values={values}
step={props.step}
Expand Down