Skip to content

Commit

Permalink
Disable rollup for developemnt, update border radius of tile
Browse files Browse the repository at this point in the history
  • Loading branch information
Archie Houston Callum Houston authored and Archie Houston Callum Houston committed Aug 28, 2024
1 parent 30c2eac commit 9c97607
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/components/atoms/Button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const Button: React.FC<ButtonProps> = ({ title, onPress, variant }) => {

return (
<TouchableOpacity
style={[buttonStyle, { borderRadius: theme.sizes.borderRadiusButton }]}
style={[buttonStyle, { borderRadius: theme.sizes.borderRadiusSmButton }]}
onPress={onPress}
>
<View style={styles.buttonInner}>
Expand Down
2 changes: 1 addition & 1 deletion lib/components/atoms/LoadingIndicator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const LoadingIndicator: React.FC<LoadingIndicatorProps> = () => {
styles.container,
{
backgroundColor: theme.surface,
borderRadius: theme.sizes.borderRadius,
borderRadius: theme.sizes.borderRadiusSm,
padding: theme.sizes.md,
},
]}
Expand Down
6 changes: 3 additions & 3 deletions lib/components/atoms/ProgressBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ const useStyles = (theme: ThemeObject) => {
return StyleSheet.create({
container: {
width: "100%",
borderRadius: theme.sizes.borderRadiusRounded,
borderRadius: theme.sizes.borderRadiusSmRounded,
overflow: "hidden",
},
progress: {
borderRadius: theme.sizes.borderRadiusRounded,
borderRadius: theme.sizes.borderRadiusSmRounded,
height: "100%",
},
});
Expand All @@ -32,7 +32,7 @@ const useContainerStyles = (theme: ThemeObject) => ({

const useProgressStyles = createVariantSystem(
// @ts-ignore
(theme: ThemeObject) => ({ borderRadius: theme.sizes.borderRadiusRounded }),
(theme: ThemeObject) => ({ borderRadius: theme.sizes.borderRadiusSmRounded }),
(theme: ThemeObject) => ({
primary: { backgroundColor: theme.primary },
accent: { backgroundColor: theme.accent },
Expand Down
10 changes: 8 additions & 2 deletions lib/components/atoms/Tile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { StyleSheet, View } from "react-native";
import { useTheme } from "../../../context/ThemeContext";
import { useSectionContext } from "../../organisms/Section";
import LoadingIndicator from "../LoadingIndicator";
import { createResponsiveStyle } from "../../../utils/responsiveHelper";

type TileProps = {
children: React.ReactNode;
Expand All @@ -13,14 +14,20 @@ const Tile: React.FC<TileProps> = ({ children }) => {
const { loading: isLoading } = useSectionContext();
const { theme } = useTheme();

const responsiveStyles = createResponsiveStyle({
borderRadius: [theme.sizes.borderRadiusSm, theme.sizes.borderRadiusSm, theme.sizes.borderRadiusLg],
maxWidth: [270, 270, 320],
});

return (
<View
style={[
styles.container,
{
backgroundColor: theme.surface,
borderColor: Color(theme.surface).darken(0.02).string(),
borderRadius: theme.sizes.borderRadius,
borderRadius: responsiveStyles.borderRadius,
maxWidth: responsiveStyles.maxWidth,
},
]}
>
Expand All @@ -37,7 +44,6 @@ const styles = StyleSheet.create({
alignItems: "flex-start",
justifyContent: "center",
position: "relative",
maxWidth: 270,
borderWidth: 1,
aspectRatio: 1,
// shadowColor: "#AAAAAA",
Expand Down
2 changes: 1 addition & 1 deletion lib/components/organisms/PointsTile/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const PointsTile: React.FC<PointsTileProps> = ({ configuration }) => {
container: {
padding: theme.sizes.md,
maxWidth: 270,
borderRadius: theme.sizes.borderRadius,
borderRadius: theme.sizes.borderRadiusSm,
width: "100%",
flexDirection: "row",
alignItems: "center",
Expand Down
2 changes: 1 addition & 1 deletion lib/components/organisms/Section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const SectionContent: React.FC = () => {
<View
style={[
styles.sectionContent,
{ borderRadius: theme.sizes.borderRadius },
{ borderRadius: theme.sizes.borderRadiusSm },
]}
>
<Icon name="AlertTriangle" size={24} color="#967132" />
Expand Down
4 changes: 2 additions & 2 deletions lib/utils/responsiveHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Dimensions } from "react-native";
// Define breakpoints
const BREAKPOINTS = {
MOBILE: 0,
TABLET: 600,
DESKTOP: 1024,
TABLET: 767,
DESKTOP: 768,
};

type ResponsiveStyle<T> = {
Expand Down
3 changes: 2 additions & 1 deletion lib/utils/styling.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { BaseThemeObject } from "../types/theme";

export const sizes = {
borderRadius: 15,
borderRadiusSm: 15,
borderRadiusLg: 20,
borderRadiusButton: 9,
borderRadiusRounded: 9999,
sm: 6,
Expand Down
3 changes: 0 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
"node": ">=18"
},
"scripts": {
"build": "rollup -c rollup.config.cjs --bundleConfigAsCjs",
"build:types": "tsc --emitDeclarationOnly",
"prepare": "yarn build",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"test-storybook": "test-storybook",
Expand Down

0 comments on commit 9c97607

Please sign in to comment.