Error changing ActivityIndicator color
まだ誰も着手していません。
評価
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 初心者へのやさしさ
- 35/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- react-native, typescript
- 領域
- mobile
調査の方向性
Start by reproducing the reported ActivityIndicator example through the createRestyleComponent entry point and inspect how the color prop is handled. Confirm the expected behavior when color="green1" is passed, and consider the issue done when the native indicator visibly uses the theme color.
索引モデルが issue の本文から書いたものです。
説明
I believe there is a bug when using the ActivityIndicator component, when using restyle the color does not change.
My Theme:
import {createTheme} from '@shopify/restyle';
const palette = {
black1: '#101010',
black2: '#2D2D2D',
black3: '#585858',
black4: '#9F9F9F',
black5: '#CFCFCF',
black6: '#E7E7E7',
green1: '#4FAF5A',
green2: '#84C78C',
green3: '#B9DFBD',
red1: '#E03F3F',
red2: '#E97979',
red3: '#F3B2B2',
background: '#F1F1F1',
white: '#FFFFFF',
};
export const theme = createTheme({
colors: {
...palette,
primary: palette.green1,
primaryContrast: palette.white,
background: palette.background,
sucess: palette.green1,
error: palette.red1,
},
spacing: {
s4: 4,
s8: 8,
s12: 12,
s16: 16,
s20: 20,
s24: 24,
s32: 32,
s40: 40,
},
textVariants: {
defaults: {},
},
borderRadii: {
br4: 4,
br8: 8,
br12: 12,
br16: 16,
br20: 20,
br24: 24,
br32: 32,
br40: 40,
},
});
export type Theme = typeof theme;
Component:
import {
createRestyleComponent,
BackgroundColorProps,
SpacingProps,
spacing,
ColorProps,
} from '@shopify/restyle';
import {
ActivityIndicatorProps as RNActivityIndicatorProps,
ActivityIndicator as RNActivityIndicator,
} from 'react-native';
import {theme, Theme} from '../../theme/theme';
interface ActIndiProps extends RNActivityIndicatorProps {
}
type ActivityIndicatorProps = BackgroundColorProps<Theme> &
ColorProps<Theme> &
SpacingProps<Theme> &
ActIndiProps;
export const ActivityIndicator = createRestyleComponent<
ActivityIndicatorProps,
Theme
>([spacing], ({color, ...rest}: ActivityIndicatorProps) => {
return <RNActivityIndicator {...rest} color={color} />;
});
Example usage:
function App() {
const [email, setEmail] = useState('');
const [error, setError] = useState(false);
return (
<ThemeProvider theme={theme}>
<TouchableWithoutFeedback onPress={Keyboard.dismiss} accessible={false}>
<SafeAreaView style={{flex: 1}}>
<View
style={{
flex: 1,
paddingHorizontal: 24,
}}>
<ActivityIndicator color="green1" size="large" />
</View>
</SafeAreaView>
</TouchableWithoutFeedback>
</ThemeProvider>
);
}
export default App;
- 主要言語
- TypeScript
- スター
- 3.4k
- フォーク
- 154
- PR マージ指標
- 30日以内にマージされた PR はありません
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートあり
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
Shopify/restyle のほかの issue
-
Reanimated 4.4.x animated components conflict with Restyle theme対応中かも @KAMRONBEK が 131 日前に担当しました。 オープンbug
難易度 3/5 1〜2日 初心者へのやさしさ 55/100
-
bug
難易度 1/5 1時間未満 初心者へのやさしさ 15/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
Shopify/restyle の issue をすべて見る
似ている issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 75/100
testing-library/jest-dom#749 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 80/100
zed-industries/delta-claude#50 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CDLUC3/dmptool-doc#660 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
stripe/stripe-terminal-react-native#1162 ·
メンテナーはふだん 1 日以内に返信