Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert icon clipped fix #755

Merged
merged 2 commits into from
Aug 2, 2023
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
6 changes: 3 additions & 3 deletions example/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@draftbit/example",
"description": "Example app for @draftbit/ui",
"version": "47.7.6",
"version": "47.7.7",
"private": true,
"main": "__generated__/AppEntry.js",
"scripts": {
Expand All @@ -16,8 +16,8 @@
"clean:modules": "rimraf node_modules"
},
"dependencies": {
"@draftbit/maps": "47.7.6",
"@draftbit/ui": "47.7.6",
"@draftbit/maps": "47.7.7",
"@draftbit/ui": "47.7.7",
"@expo/dev-server": "0.1.123",
"@expo/webpack-config": "^0.17.2",
"@react-navigation/drawer": "^5.12.9",
Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "47.7.6",
"version": "47.7.7",
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*", "example"],
Expand Down
2 changes: 1 addition & 1 deletion packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@draftbit/core",
"version": "47.7.6",
"version": "47.7.7",
"description": "Core (non-native) Components",
"main": "lib/commonjs/index.js",
"types": "lib/typescript/src/index.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/components/Checkbox/Checkbox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ const Checkbox: React.FC<CheckboxProps & PressableProps & IconSlot> = ({
accessibilityState={{ disabled }}
accessibilityRole="button"
accessibilityLiveRegion="polite"
style={[styles.container, style]}
style={[styles.container, style, { width: size, height: size }]}
>
<Icon
style={styles.icon}
Expand Down
2 changes: 2 additions & 0 deletions packages/core/src/components/IconButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ const IconButton: React.FC<React.PropsWithChildren<Props>> = ({
styles.container,
{
opacity: pressed ? activeOpacity : disabled ? disabledOpacity : 1,
width: size,
height: size,
alignItems: "center",
justifyContent: "center",
},
Expand Down
4 changes: 2 additions & 2 deletions packages/maps/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@draftbit/maps",
"version": "47.7.6",
"version": "47.7.7",
"description": "Map Components",
"main": "lib/commonjs/index.js",
"types": "lib/typescript/src/index.d.ts",
Expand Down Expand Up @@ -39,7 +39,7 @@
},
"homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
"dependencies": {
"@draftbit/ui": "47.7.6",
"@draftbit/ui": "47.7.7",
"@teovilla/react-native-web-maps": "^0.9.1",
"lodash.isequal": "^4.5.0",
"react-native-maps": "1.3.2"
Expand Down
2 changes: 1 addition & 1 deletion packages/native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@draftbit/native",
"version": "47.7.5",
"version": "47.7.7",
"description": "Draftbit UI Components that Depend on Native Components",
"main": "lib/commonjs/index.js",
"types": "lib/typescript/src/index.d.ts",
Expand Down
44 changes: 25 additions & 19 deletions packages/native/src/components/Icon.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
import * as React from "react";
import { ViewProps, StyleProp, ImageStyle, Platform } from "react-native";
import {
View,
StyleSheet,
ViewProps,
StyleProp,
ImageStyle,
Platform,
} from "react-native";

// This must use require to work in both web as a published project and in Snack
const VectorIcons = require("@expo/vector-icons");
Expand Down Expand Up @@ -28,25 +35,24 @@ const Icon: React.FC<React.PropsWithChildren<Props>> = ({
const IconSet = VectorIcons[iconSet];

return (
<IconSet
{...rest}
name={name}
color={color}
size={size}
style={[
{
...Platform.select({
web: {
cursor: "pointer",
userSelect: "none",
},
}),
},
,
style,
]}
/>
<View style={[styles.container, { width: size, height: size }, style]}>
<IconSet {...rest} name={name} color={color} size={size} />
</View>
);
};

const styles = StyleSheet.create({
container: {
alignItems: "center",
justifyContent: "center",
overflow: "hidden",
...Platform.select({
web: {
cursor: "pointer",
userSelect: "none",
},
}),
},
});

export default Icon;
6 changes: 3 additions & 3 deletions packages/ui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@draftbit/ui",
"version": "47.7.6",
"version": "47.7.7",
"description": "Draftbit UI Library",
"main": "lib/commonjs/index.js",
"types": "lib/typescript/src/index.d.ts",
Expand Down Expand Up @@ -43,8 +43,8 @@
},
"homepage": "https://github.com/draftbit/react-native-jigsaw#readme",
"dependencies": {
"@draftbit/core": "47.7.6",
"@draftbit/native": "47.7.5",
"@draftbit/core": "47.7.7",
"@draftbit/native": "47.7.7",
"react-native-reanimated": "~2.12.0"
},
"eslintIgnore": [
Expand Down
Loading