From 1603c80e958478adc825048a930347860b62b015 Mon Sep 17 00:00:00 2001 From: Stanyslav Yadykin Date: Fri, 9 Apr 2021 16:27:30 +0300 Subject: [PATCH 1/2] CSS styles fix --- src/js/components/Forecast.styles.js | 3 ++- src/js/components/WeatherIcon.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/components/Forecast.styles.js b/src/js/components/Forecast.styles.js index 446ab43..9fa47f2 100644 --- a/src/js/components/Forecast.styles.js +++ b/src/js/components/Forecast.styles.js @@ -14,7 +14,8 @@ const useStyles = createUseStyles({ day: { width: '25%', textAlign: 'center', - margin: 10, + margin: '10px 0', + padding: '0 10px', '&:not(:first-child)': { borderLeft: ({ theme }) => `solid 1px ${theme.forecastSeparatorColor}`, }, diff --git a/src/js/components/WeatherIcon.js b/src/js/components/WeatherIcon.js index d276164..28cd506 100644 --- a/src/js/components/WeatherIcon.js +++ b/src/js/components/WeatherIcon.js @@ -37,7 +37,7 @@ WeatherIcon.propTypes = { WeatherIcon.defaultProps = { color: '#4BC4F7', size: 40, - viewBox: '0 0 35 40', + viewBox: '0 -5 35 40', }; export default WeatherIcon; From 3f7348b5869ea8bfa7106c019864c8b16f41e200 Mon Sep 17 00:00:00 2001 From: Stanyslav Yadykin Date: Sat, 10 Apr 2021 16:09:45 +0300 Subject: [PATCH 2/2] Tests fix --- tests/__snapshots__/Forecast.test.js.snap | 8 ++++---- tests/__snapshots__/ReactWeather.test.js.snap | 10 +++++----- tests/__snapshots__/WeatherIcon.test.js.snap | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/__snapshots__/Forecast.test.js.snap b/tests/__snapshots__/Forecast.test.js.snap index 096bc84..61e1aee 100644 --- a/tests/__snapshots__/Forecast.test.js.snap +++ b/tests/__snapshots__/Forecast.test.js.snap @@ -20,7 +20,7 @@ exports[`Forecast should render the Forecast component 1`] = ` className="svg-0-2-12 svg-d0-0-2-13" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -62,7 +62,7 @@ exports[`Forecast should render the Forecast component 1`] = ` className="svg-0-2-12 svg-d1-0-2-14" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -104,7 +104,7 @@ exports[`Forecast should render the Forecast component 1`] = ` className="svg-0-2-12 svg-d2-0-2-15" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -146,7 +146,7 @@ exports[`Forecast should render the Forecast component 1`] = ` className="svg-0-2-12 svg-d3-0-2-16" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > diff --git a/tests/__snapshots__/ReactWeather.test.js.snap b/tests/__snapshots__/ReactWeather.test.js.snap index 52c0a7c..fcd8033 100644 --- a/tests/__snapshots__/ReactWeather.test.js.snap +++ b/tests/__snapshots__/ReactWeather.test.js.snap @@ -73,7 +73,7 @@ exports[`ReactWeather should render the ReactWeather component 1`] = ` className="svg-0-2-19 svg-d0-0-2-20" height={120} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={120} xmlns="http://www.w3.org/2000/svg" > @@ -105,7 +105,7 @@ exports[`ReactWeather should render the ReactWeather component 1`] = ` className="svg-0-2-19 svg-d1-0-2-32" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -147,7 +147,7 @@ exports[`ReactWeather should render the ReactWeather component 1`] = ` className="svg-0-2-19 svg-d2-0-2-33" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -189,7 +189,7 @@ exports[`ReactWeather should render the ReactWeather component 1`] = ` className="svg-0-2-19 svg-d3-0-2-34" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > @@ -231,7 +231,7 @@ exports[`ReactWeather should render the ReactWeather component 1`] = ` className="svg-0-2-19 svg-d4-0-2-35" height={40} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={40} xmlns="http://www.w3.org/2000/svg" > diff --git a/tests/__snapshots__/WeatherIcon.test.js.snap b/tests/__snapshots__/WeatherIcon.test.js.snap index eb00c15..4e20fff 100644 --- a/tests/__snapshots__/WeatherIcon.test.js.snap +++ b/tests/__snapshots__/WeatherIcon.test.js.snap @@ -5,7 +5,7 @@ exports[`WeatherIcon render WeatherIcon 1`] = ` className="svg-0-2-1 svg-d0-0-2-2" height={120} version="1.1" - viewBox="0 0 35 40" + viewBox="0 -5 35 40" width={120} xmlns="http://www.w3.org/2000/svg" >